Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sheet_activate event (to another Sheet and back again.....)
I want some code to run whenever Sheet8 is activated, so am running the code
(which is "stored" in ThisWorkbook) on the sheet.activate event. The code essentially is a counter function, going to Sheet3, getting values for 3 counters, and then going back to Sheet8 to enter the value for the counters. I get an run-time error '1004" at this place in the code: ActiveWorkbook.Worksheets(8).Select Range("B" & (47 + Y)).Select ActiveCell.Value = counterH I surmise I'm mis-identifying Sheet8, but this is exactly how I identified Sheet3, when I went there. I cannot get the code to continue. Any suggestions, guys? TIA |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sheet_activate event (to another Sheet and back again.....)
If the name of your worksheet is Sheet8, I would use
ActiveWorkbook.Worksheets("Sheet8").Select Ed "zSplash" <zNOSPAMSplash@ gci.net wrote in message ... I want some code to run whenever Sheet8 is activated, so am running the code (which is "stored" in ThisWorkbook) on the sheet.activate event. The code essentially is a counter function, going to Sheet3, getting values for 3 counters, and then going back to Sheet8 to enter the value for the counters. I get an run-time error '1004" at this place in the code: ActiveWorkbook.Worksheets(8).Select Range("B" & (47 + Y)).Select ActiveCell.Value = counterH I surmise I'm mis-identifying Sheet8, but this is exactly how I identified Sheet3, when I went there. I cannot get the code to continue. Any suggestions, guys? TIA |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sheet_activate event (to another Sheet and back again.....)
Thank you, Ed. For some reason, that worked. Appreciate it.
st. "Ed" wrote in message ... If the name of your worksheet is Sheet8, I would use ActiveWorkbook.Worksheets("Sheet8").Select Ed "zSplash" <zNOSPAMSplash@ gci.net wrote in message ... I want some code to run whenever Sheet8 is activated, so am running the code (which is "stored" in ThisWorkbook) on the sheet.activate event. The code essentially is a counter function, going to Sheet3, getting values for 3 counters, and then going back to Sheet8 to enter the value for the counters. I get an run-time error '1004" at this place in the code: ActiveWorkbook.Worksheets(8).Select Range("B" & (47 + Y)).Select ActiveCell.Value = counterH I surmise I'm mis-identifying Sheet8, but this is exactly how I identified Sheet3, when I went there. I cannot get the code to continue. Any suggestions, guys? TIA |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Worksheet Change Event - copy cell to another sheet | Excel Discussion (Misc queries) | |||
Cancel sheet change event | Charts and Charting in Excel | |||
workbook/sheet event macro | Excel Discussion (Misc queries) | |||
Sheet Name Change Event? | Excel Programming | |||
Sheet Name Change Event? | Excel Programming |