Excel quits when executing Activesheet.Name instruction
Workbook protection is not on.
The statement actually executes (ie, the sheet is renamed to "Export") before
the macro quits. In addition, I can see the workbook being recalculated just
after the rename, even though there's no Recalculation statement in the
vicinity.
Let me know of any ideas you have.
--
Regards,
Fred
"Joerg" wrote in message
...
Is the statement executed (i.e is ActiveSheet renamed to "Export") before
the macro quits or is the statement itself causing this behavior?
"Fred Smith" wrote in message
...
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
|