Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reliably get sheet 1 of the active workbook
I have some VBA code that does the following:
Option Compare Text for i = 1 to ActiveWorkBook.Worksheets(i) if ActiveWorkBook.Worksheets(i).CodeName = "Sheet1" then set ws = ActiveWorkBook.Worksheets(i) exit for end if next i The problem is that this code doesn't always return as expected. In the debuger, it always works, when run from an Add-In menu item, it works about 10% of the time. Any ideas, Thanks, Mike. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy value from active sheet to another workbook | New Users to Excel | |||
Consolidation of data from cell in active sheet of closed workbook | Excel Worksheet Functions | |||
Active Cell Copy And Paste Sheet to Sheet | New Users to Excel | |||
autorecover doesn't work reliably during a forced reboot | Excel Discussion (Misc queries) | |||
copy worksheet from closed workbook to active workbook using vba | Excel Worksheet Functions |