Hide / Unhide Columns With Selected Cells Change Font Size

Apr 21, 2014

I have recorded macro.

What I am trying to achieve is ....

When I select cell A2 and press command button Then - Columns C, D, E are unhidden

-Relative cells in selected row ( in this case C2,D2,E2) change font to 12

- When command button is pressed then C,D,E are hidden and font size goes back to 1

similarly if i select A3 same should happen to C3,D3,E3

Currently all is OK but when I press command button it all happens with the entire column C,D,E

Sample book attached.

Code is as follows:

[code]....

View 6 Replies


ADVERTISEMENT

VBA Change Font Size Of A Character Or Letter Within Any String In Selected Cells

May 15, 2009

Looking for VBA that can change the font size of "•" char(0149) within any string in selected cells.

Also looking to delete the last "•" char(0149) within any string of selected cells.

What would the syntax for these two functions be?

View 9 Replies View Related

Comparing Two Cells Based On Text, Font, Colour, Font Size Etc

Jun 3, 2006

I'm looking to set up a spreadsheet whereby individuals answer questions and have to format their answer using a particular font, colour, font size and so on. The idea is that I can then compare their answer sheet to a pre completed one using an =IF function and get a total score. The only problem is =if and =exact only lookup cell text/numbers and don't look at how the text is formatted within them.

View 9 Replies View Related

Change Size Of Tab Font

May 7, 2009

Somehow my tab names (in 2003) have a very small font size. How do I return the size to normal?

View 5 Replies View Related

Change Font Size Of Combo Box

Jul 18, 2007

I've created a combo box in excel with the macro recorder. This is the code that came back:

Sub test1()
ActiveSheet.DropDowns.Add(1305, 52.5, 242.25, 39).Select
With Selection
.ListFillRange = "$AW$4:$AW$18"
.LinkedCell = "$AX$5"
.DropDownLines = 5
.Display3DShading = False
End With
End Sub

This always results in a default font size of 8 for my list. Can anyone tell me how to modify the code above to change the font size to 14? And how to modify the color of the list.

View 3 Replies View Related

Activex Combobox Change Font Size - VBA

Sep 13, 2012

I am trying to change the font size on my combo box using VBA.

I create the combobox dynamically, so need to be able to change the font too.

This is how I create the combobox, however the .Font.Size = 10 does not work and the default font size is 11.

Code:
With ActiveSheet .OLEObjects.Add(ClassType:="Forms.ComboBox.1", Link:=False, _
DisplayAsIcon:=False, Left:=159.75, Top:=80.25, Width:=75.75, Height:=19.5) _
.Font.Size = 10
.Name = "cmbBaseD"
.OLEObjects("cmbBaseD").ListFillRange = "DynRng"
End With

View 2 Replies View Related

Automatically Change Font Size On Selection

Aug 13, 2008

I use this ok code to increase the font in the selected cell:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim TargetRange As Range
Dim isect
Set TargetRange = Range("C:D")
Set isect = Intersect(Target, TargetRange)
If Not isect Is Nothing Then
Columns("C:D").Font.Size = 11
Target.Font.Size = 15
Exit Sub
End If
Columns("C:D").Font.Size = 11
End Sub

The problem is when i press ctrl+c to copy a cell content, so once i move the curser to the distenation cell then the copying mode in selected cell disappeared.
It is because when the event is trigered then the copying mode stops. The question is : how to let the copying mode works even when the event is trigered ?

View 4 Replies View Related

Concatenate Cells In Columns & Change Part Of Font

Apr 12, 2008

I need for it do perform the same action on multiple rows/ cells of data. What adjustment to the code needs to be performed to do so?

Sub fconcat()
Range("C1").Value = Range("A1").Value & Range("B1").Value
For i = 1 To Range("A1").Characters.Count
Range("C1").Characters(i, 1).Font.Name = Range("A1").Characters(i, 1).Font.Name
Next
For i = 1 To Range("B1").Characters.Count
Range("C1").Characters(Range("A1").Characters.Count + i, 1).Font.Name = Range("B1").Characters(i, 1).Font.Name
Next
End Sub

View 3 Replies View Related

Hide/unhide User Selected Rows

May 15, 2007

I'm trying to create a macro that allows users to hide or unhide selected rows, either via toggle or userform. The macro I have looks like this, but for some reason it doesn't hide the rows:

Sub Hide_Range()
Dim UserRange As Range
DefaultRange = Selection.Address
Set UserRange = Application.InputBox _
(Prompt:="Select Range to Hide:", _
Title:="Hide Range", _
Default:=DefaultRange, _
Type:=8)
Rows.Select
Selection.EntireRow.Hidden = True
End Sub

what's wrong with my code and how I can further develop it to let the user decide whether to hide or unhide the selected rows?

View 3 Replies View Related

Hide/unhide Selected Range In All Sheets

Aug 10, 2007

I have several workbooks, and the workbooks can include several sheets. Is there's an easy way to create a macro so the user selection to be hidden or unhidden is hidden or unhidden in all sheets in the workbook. E.g. if the user selection is to hide rows 54-189, the macro hides rows 54-189 in all sheets in the workbook.

View 2 Replies View Related

Excel 2010 :: Change Font Size In A Checkbox?

Jan 30, 2013

How do you changethe font size in acheckbox in excel 2010?

View 1 Replies View Related

How To Change Font Size Within Combobox (Form Control)

Feb 1, 2014

I have a combo Box (Form Control) in my spreadsheet which is basically used as a drop down menu.

How do I change the font size of the text that appears in the box?

View 2 Replies View Related

How To Change Font Size In VB Generated Email Through Outlook

Nov 22, 2013

I have this code as seen below that sends an email.

I would like to change the font size of - mymail.body=

How can I modify this existing code to achieve that.

Code:

Set myOlApp = CreateObject("Outlook.Application")
Set mymail = myOlApp.CreateItem(olMailItem)
mymail.Subject = strSubject
mymail.Body = "WHAT DO YOU PUT INTO A BOX ?"
mymail.Display
mymail.ReadReceiptRequested = False
mymail.attachments.Add "P:SR.xls"
mymail.to = "email@email.com"
mymail.Send

View 4 Replies View Related

Macro Works Unless Change Font Size In Document?

Jul 7, 2014

I have this macro that works perfectly. My boss wanted the subtotal lines within the report to be in a smaller font, so I added lines to the macro to do that. It won't work with those lines in there! It says the reference is not valid on the red line in the code below. The 2 blue sections are the ones I added to change the font size.

Code:
'Add subtotals at the end of each age bucket
For i = 10 To LR Step 1
fr = Range("E" & i - 3).End(xlUp).Row
If Range("B" & i).Value = "Totals" Then
Range("E" & i).Formula = "=SUBTOTAL(9,E" & fr & ":E" & i - 2 & ")"
With Range("E" & i & ":R" & i).FillRight

[code].....

Why would the font size make a difference? Is there some other way to change the font size that would work better?

View 5 Replies View Related

Change The Font Style, Size And Colour In An Email

May 26, 2009

I'm looking for the lines of VBA coding that will allow me to change the Font style, size and colour in an email.

View 9 Replies View Related

Hide Selected Sheets And Not Unhide Without Entering Password

Mar 18, 2014

I want to hide selected sheets and when i want to unhide them, ask for password to unhide the sheets.

View 10 Replies View Related

Use Conditional Formatting To Change Font Size Based On Value Of Cell?

Jul 18, 2013

I am trying to set up conditional formatting in cell C4 to change the font to a smaller number based on the value of C4. If C4 = 0 then Font Calibri 16, otherwise Font Calibri 24. However, the font size is not availabe, it is greyed out. Is there another way to accomplish this without using VBA? In the worksheet could I use an if() statement to change the font size?

View 6 Replies View Related

Change Font Style / Size And Colour Of Text In Combobox

Nov 8, 2013

Is there any way to change font style, size and colour of text in a combobox?

View 1 Replies View Related

Hide/Unhide The Columns

Jun 16, 2009

I've come across a spreadsheet where certain rows and columns (typically top rows or left columns) are hidden; however, there's no way to unhide them (the unhide function is grayed out) and it doesn't seem to be protected or no visible macros/vba on the file.

View 3 Replies View Related

Hide/Unhide Columns

Dec 19, 2008

I have a spreadsheet that has 28 columns for time entries. Typically only the first 12 columns are used, so I would like to hide the remaining 16 columns (which makes the spreadsheet much more user-friendly). It would probably be nearly impossible to teach all of them how to Unhide the remaining columns (and re-Hide), plus I would like to use the full-screen function when employees enter thier times. I would like to use a form control in the column heading so that when the employees 'check' it, it will Unhide and then re-Hide the columns. Any way to do this? Seems like a VB thing to me (out of my league, but would be happy to add one in!).

View 2 Replies View Related

VBA To Unhide And Hide Columns?

Oct 23, 2002

I want to create two buttons.. one name HIDE and the other UNHIDE.

What I need hide button to do when i click it is hide the 4 columns to the right (not always going to be columns b:e)

For the unhide button unhide the 4 columns to the right (not always going to be columns b:e)

View 9 Replies View Related

Hide / Unhide Columns By The Use Of + And -

Mar 5, 2013

I once saw an excel sheet where I could hide or unhide a section by some + and - signes above the column-letters.... I have searched for this but I only get the ordinary hide/unhide solutions.

View 4 Replies View Related

Button To Hide / Unhide Columns

Jul 25, 2012

I'm looking to make a simple button that would hide a given range of columns.

This is the simplest I could find:

VB:
Sub button1()
Columns("AD:AE").EntireColumn.Hidden = Not Columns("AD:AE").EntireColumn.Hidden
End Sub

Although this works nicely, there was another way to do it (looks more ergonomic and doesn't take up spreadsheet space). Here's a screenshot of what I mean: ColumnHide.gif

View 2 Replies View Related

Hide Or Unhide Columns With One Macro

Nov 21, 2008

I have a single button I want to use to call a macro to:
1.Hide columns C:AZ if they arent already hidden
2.Unhide columns C:AZ if they are already hidden.

View 2 Replies View Related

Set Up Macro That Will Hide And Unhide Columns?

Nov 27, 2012

I want to set up a macro that will hide and unhide columns.

View 9 Replies View Related

VBA Cycle Hide / Unhide Columns?

Aug 5, 2013

The code below if I run once Hide the Range("H:FV,GG:IV") and shows the Range("A:G, FW:GF") And if I run it again Unhide the Range("H:FV,GG:IV") And Show all columns

Code:
Sub Hide_Unhide()Range("H:FV,GG:IV").Select
If Selection.EntireColumn.Hidden = True Then
Range("H:FV,GG:IV").EntireColumn.Hidden = False
Else
Range("H:FV,GG:IV").Select
If Selection.EntireColumn.Hidden = False Then
Range("H:FV,GG:IV").EntireColumn.Hidden = True
End If
End If
Range("A1").Select
End Sub

Above code is working with 2 cases now is it possible to add 3rd case Hide Or Unhide Range("H:GG,GI:HJ,HO:IV") in the same code, and shows the Range("A:G, GH, HK:HN")

Resume: my request
Step1-if I run macro First time it must Hide Range("H:FV,GG:IV") and shows the Range("A:G, FW:GF")
Step2-If I run macro Second time it must Hide Range("H:GG,GI:HJ,HO:IV") and shows the Range("A:G, GH, HK:HN")
Step3-if I run macro third time it must show all columns

And repeat same cycle all time Step 1 to 2, Step2 to 3 and Step3 to 1

View 2 Replies View Related

Using VBA To Hide And Unhide Multiple Columns?

Dec 1, 2013

I have a worksheet with a fair amount of data. It is split into two parts: the main part is a table with data in columns D to AR while the other part is simply a list with checkboxes against each item. I have set things up so that when a checkbox is ticked against an item in the list, then a 2 appears in row 2 above the relevant column in the main table; if the checkbox is unticked then a 2 appears above the relevant column.

What I seek is a macro that will hide all columns that do not have the associated item ticked; in other words, I want columns to be hidden if there is a 1 in the relevant cell in Row 2 (and visible if there is a 2 there).

I have used the following code (obtained from this forum), but it doesn't work as expected. When I select the items, the cells in Row 2 react as expected, but the hiding and unhiding only occurs when I go to another Worksheet and then return to the Worksheet where the data is. Obviously I want the macro to work immediately I tick or untick a checkbox. What is wrong with the code I have used?

Private Sub Worksheet_Activate()
Call HideCols
End SubSub

[Code]....

View 6 Replies View Related

Macro To Hide & Unhide Certain Columns

Sep 19, 2008

I'd like a macro that can hide/unhide certain columns. At the moment, the columns I want to hide/unhide are F, I, M, P, U and Y.

View 4 Replies View Related

Hide & Unhide Columns With Password

Nov 9, 2006

I have a range of columns ( J:AH) which i have to hide from the user interface.In order to unhide, the editor must enter a password. He/ She can only enter the password thrice. After 3 times, if it is still wrong, the whole workbook must be closed. Is this possible? If not, I'll settle for something less complicated.

View 9 Replies View Related

Hide/Unhide Columns With Macro

Sep 3, 2007

I need hide/show some column by using Macro Button. I have attached the excel sheet( name VBA testing.xls). I need to hide column K,L,N,O & visible column G,H by clicking button "Plan A".Similarly i need to hide the column G,H,N,O & unhide the column K,L by clicking the button "Plant 2. Similarly by clicking the Button "Plant 3", hiding the column G,H,K,L are needed whereas column N,O will be unhide.

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved