Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel quits when executing Activesheet.Name instruction
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel quits when executing Activesheet.Name instruction
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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel quits unexpectedly | Excel Worksheet Functions | |||
VBA (excel) quits on workbooks.open | Excel Programming | |||
Excel quits when saving Macro spreadsheets | Excel Discussion (Misc queries) | |||
excel will not bold a cell, then program quits | Excel Worksheet Functions | |||
excel will not bold a cell, then program quits | Excel Worksheet Functions |