![]() |
Invalid Name in Macro
Hopefully someone can point me in the right direction on what is causing
this and how to fix it. I have a macro that emails a selection to a specified address. Sometimes when I press Alt-F8 the run button is disabled. When this happens the name of the macro is ThisWorkbook!Send_Mail At times, the macro works fine and the run button is enabled but I have noticed that when it is, the macro name is ThisWorkbook.Send_Mail (period instead of an exclamation) When it is an exclamation point, clicking edit and then closing the vb window SOMETIMES allows me to run it. Can someone point me in the right direction to resolve this. I have no clue on why this is sporadically happening. Always the same computer, using Excel 2000. Thanks Charlie |
Invalid Name in Macro
Charles
What is the name of the macro and what is the name of the module that it's in? -- Dick Kusleika MVP - Excel Excel Blog - Daily Dose of Excel www.dicks-blog.com "Charles May" wrote in message news:eICmc.43742$Ik.2893688@attbi_s53... Hopefully someone can point me in the right direction on what is causing this and how to fix it. I have a macro that emails a selection to a specified address. Sometimes when I press Alt-F8 the run button is disabled. When this happens the name of the macro is ThisWorkbook!Send_Mail At times, the macro works fine and the run button is enabled but I have noticed that when it is, the macro name is ThisWorkbook.Send_Mail (period instead of an exclamation) When it is an exclamation point, clicking edit and then closing the vb window SOMETIMES allows me to run it. Can someone point me in the right direction to resolve this. I have no clue on why this is sporadically happening. Always the same computer, using Excel 2000. Thanks Charlie |
Invalid Name in Macro
Dick,
The Sub is Send_Mail, the Macro in the list when I hit F8 is ThisWorkBook.Mail (this works, the period becomes an exclamation at times and it doesn't work any longer) The code is in the Declarations of the ThisWorkbook section. Thanks Charlie "Dick Kusleika" wrote in message ... Charles What is the name of the macro and what is the name of the module that it's in? -- Dick Kusleika MVP - Excel Excel Blog - Daily Dose of Excel www.dicks-blog.com "Charles May" wrote in message news:eICmc.43742$Ik.2893688@attbi_s53... Hopefully someone can point me in the right direction on what is causing this and how to fix it. I have a macro that emails a selection to a specified address. Sometimes when I press Alt-F8 the run button is disabled. When this happens the name of the macro is ThisWorkbook!Send_Mail At times, the macro works fine and the run button is enabled but I have noticed that when it is, the macro name is ThisWorkbook.Send_Mail (period instead of an exclamation) When it is an exclamation point, clicking edit and then closing the vb window SOMETIMES allows me to run it. Can someone point me in the right direction to resolve this. I have no clue on why this is sporadically happening. Always the same computer, using Excel 2000. Thanks Charlie |
Invalid Name in Macro
Charlie The code is in the Declarations of the ThisWorkbook section. It should probably be in a standard module instead of ThisWorkbook. I can't say why you're seeing what you're seeing, but in general, the ThisWorkbook module should contain events and subs that directly support those event. -- Dick Kusleika MVP - Excel Excel Blog - Daily Dose of Excel www.dicks-blog.com |
Invalid Name in Macro
"Dick Kusleika" wrote in message ... Charlie The code is in the Declarations of the ThisWorkbook section. It should probably be in a standard module instead of ThisWorkbook. I can't say why you're seeing what you're seeing, but in general, the ThisWorkbook module should contain events and subs that directly support those event. Well, it definately has me stumped. I have moved it to its own module and will see what results I have. I did notice that the macro no longer has the ThisWorkbook on the front of the name so hopefully the issue will not reoccur. Thanks for all your help Charlie |
All times are GMT +1. The time now is 11:34 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com