Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
So the following code:
Public Sub addSheet() Sheets.Add After:=Sheets(Sheets.Count) Range("A6").Select End Sub It works just fine when it is in a module. Adds the sheet and selects cell A6. But when it is in the code attached to another worksheet, it adds the sheet then gives a 1004 error. It would seem that the code attached to one sheet cannot select a cell on another sheet. I have just spent a frustrating several hours trying to figure out why I was getting this error. Some days I feel very naïve. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Toolbar Gone - STUPID STUPID STUPID!! | Excel Programming | |||
Toolbar Gone - STUPID STUPID STUPID!! | Excel Programming | |||
Toolbar Gone - STUPID STUPID STUPID!! | Excel Programming | |||
Sources of Excel Tips, Tricks & Code | Excel Discussion (Misc queries) | |||
Excel TIPS&TRICKS and Samples | Excel Discussion (Misc queries) |