Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have this code that works fine only if I am on worksheet(1),
If I am on another sheet it does not work I get runtime error 1004 Here it is #Sub BoldCells() Dim r As Range Dim i As Range Set r = Worksheets(1).Range("A1", Range("A65536").End(xlUp)) For Each i In r i.Font.Bold = Not i.Font.Bold Next i End Sub# What am I missing, so the code will work without having to select the sheet? Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
in excel - arrow keys won't work & cursor will not select a cell | Excel Discussion (Misc queries) | |||
Using formulas to select cells (Ex: Select every nth cell in a col | Excel Discussion (Misc queries) | |||
master select page field for many pivots in one work book | Excel Discussion (Misc queries) | |||
In Excel 2000, How do you select the whole of a worksheet (Select. | Excel Discussion (Misc queries) | |||
In Excel 2000, How do you select the whole of a worksheet (Select. | Excel Discussion (Misc queries) |