Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 599
Default 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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default 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


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Invalid References Elliot Excel Worksheet Functions 1 August 10th 09 08:13 PM
delete an invalid macro name TTruck Excel Discussion (Misc queries) 1 May 27th 09 06:16 PM
Invalid outside procedure (creating a PDF button as a macro) Neall Excel Worksheet Functions 0 April 30th 09 03:44 PM
Invalid qualifier error in macro orquidea Excel Discussion (Misc queries) 0 December 19th 07 06:18 PM
HELP! Macro stuck-"Invalid Object" Ed[_9_] Excel Programming 1 July 25th 03 12:06 AM


All times are GMT +1. The time now is 08:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"