Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a macro that puts data into a sheet and sets the font to bold and
color to yellow. It looks like this: Cells(x, 7).Select Selection.Font.Bold = True Selection.Interior.ColorIndex = 6 I was reading some websites that say this is not efficient, that I should use with: example: With Range("A1") .Font.Bold = True .Interior.ColorIndex = 6 End With Since my code is in a loop I use Cells(x,7). How do I format the Range object to use a variable instead of "A1"? I tried Range(Cells(x,7)) but got an error. Dan |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro error, range object need data? | Charts and Charting in Excel | |||
Programming code to new object | Excel Programming | |||
returning pivottable object from a range object | Excel Programming | |||
Range object to Array object conversion | Excel Programming | |||
Range object to Array object conversion | Excel Programming |