Excel quits when executing Activesheet.Name instruction
Do you have workbook protection on? This may stop you renaming sheets.
--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.
"Fred Smith" wrote:
I have a macro which has worked hundreds of times before.
Now, the macro quits when it gets to an Activesheet.Name = "Export" command. By
quitting, I mean it's just as if it encountered an Exit Sub command.
What would cause such strange behavior? I have other macros with
Activesheet.Name in them, and they still work. I first encountered this problem
at work where we have Office 2003 and Windows 2003. I find I have the same
problem at home, where I'm running Office XP and Windows XP.
When I step through the macro using F8, it highlights Activesheet.Name command
properly. As soon as I hit F8, the macro quits -- the yellow highlight
disappears and a data entry cursor appears. If I hit F8 again, the macro starts
over at the Sub command.
Any suggestions from anyone?
--
Regards,
Fred
|