Ro
A couple of thoughts
1) Scroll through all the sheets in the workbook and output the names on another workbook somewhere (for each sh in workbook sh.name). Then use each of the sheet names output and see if you can select them. If you can, then look for a special character in the name (do the Code function)
2) If this doesn't work, then use the sheets(index) method of selecting the sheet. It is a workaround that will allow the macro to continue in the short term
Ton
----- shinydiamond wrote: ----
I consider myself a decent VBA programmer, but I've finally come u
against an error that I can't debug in its simplest form
I keep getting an Error 40036 Application - Defined or Object - Define
error
I've traced and debugged until I came up with the simplest of script
that generates the error message
Sub test(
' test Macr
' Macro recorded 2/3/2004 by Ro
Sheets("DETAIL BOOK REPORT").Selec
End Su
I've tried to change the name of the tab, but the error remains
This is the 4th tab in a spreadsheet containing 8 tabs
Is there some kind of bug in Excel (I'm using the XP edition) that thi
error occurs in certain situations
Should I be looking for something in the spreadsheet that's causin
this
I can run the same macro on the other tabs and it's fine - no error
It's obviously not in the code
Any help would be greatly appreciated as this is killing one of m
scripts which is being used by people at my company on a daily basis
Thanks,
Ro
--
Message posted from
http://www.ExcelForum.com