Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Richard
 
Posts: n/a
Default Macro warning (upon opening)

How do you get rid to the macro warning? I have deleted all macros in the
file and saved changes. When I reopen the file, the message still pops up.
When I go to the macro section, there are no macros to select. There are not
any in my personal workbook, or current open workbook.

Is this an issue of, once a macro is attached the warning message is
permanent?

Separate question:
Where is the code to execute the macro with a shortcut? I see the option
when creating, but have not found any code to carry out the command.

  #2   Report Post  
Otto Moehrbach
 
Posts: n/a
Default

Richard
You have workbook modules, sheet modules, and regular modules, all of
which can have macros or be blank. You say that there are no macros. Have
you looked at all the sheet modules and at the workbook module? If you have
and you have deleted all the macros from those modules, then those modules
will not trigger that warning. However, an empty regular module will
trigger that warning. You have to delete those modules.
Do this. With the file on the screen, do Alt-F11. This will take you
to the VBE, Visual Basic Editor. Make sure you have the Project Explorer
window showing on the left side of the Editor screen. If you don't, click
on View - Project Explorer. In the Project Explorer find your file name.
Expand your file listing until you see the modules listed under the heading
"Modules". Select each module and click on File - Remove module modulename.
Click No when asked if you want to export that module before deleting. Do
this until you no longer have any modules listed. Done. Save the file.
HTH Otto
"Richard" wrote in message
...
How do you get rid to the macro warning? I have deleted all macros in the
file and saved changes. When I reopen the file, the message still pops
up.
When I go to the macro section, there are no macros to select. There are
not
any in my personal workbook, or current open workbook.

Is this an issue of, once a macro is attached the warning message is
permanent?

Separate question:
Where is the code to execute the macro with a shortcut? I see the option
when creating, but have not found any code to carry out the command.



  #3   Report Post  
Dave Peterson
 
Posts: n/a
Default

Debra Dalgleish has some instructions with pictures at:
http://www.contextures.com/xlfaqMac.html#NoMacros

I don't understand the second question.

If you hit the shortcut key, it runs the macro.

And you can go back later to assign the macro.
Tools|macro|macros|select your macro
Options button



Richard wrote:

How do you get rid to the macro warning? I have deleted all macros in the
file and saved changes. When I reopen the file, the message still pops up.
When I go to the macro section, there are no macros to select. There are not
any in my personal workbook, or current open workbook.

Is this an issue of, once a macro is attached the warning message is
permanent?

Separate question:
Where is the code to execute the macro with a shortcut? I see the option
when creating, but have not found any code to carry out the command.


--

Dave Peterson
  #4   Report Post  
Richard
 
Posts: n/a
Default

The second question is: Where is the code that executes the macro with the
shortcut? I believe that it is embedded in the modules (something like
uponexecute?). Is this correct?

Thanks for the tip on the options selection. I never noticed it before.

"Dave Peterson" wrote:

Debra Dalgleish has some instructions with pictures at:
http://www.contextures.com/xlfaqMac.html#NoMacros

I don't understand the second question.

If you hit the shortcut key, it runs the macro.

And you can go back later to assign the macro.
Tools|macro|macros|select your macro
Options button



Richard wrote:

How do you get rid to the macro warning? I have deleted all macros in the
file and saved changes. When I reopen the file, the message still pops up.
When I go to the macro section, there are no macros to select. There are not
any in my personal workbook, or current open workbook.

Is this an issue of, once a macro is attached the warning message is
permanent?

Separate question:
Where is the code to execute the macro with a shortcut? I see the option
when creating, but have not found any code to carry out the command.


--

Dave Peterson

  #5   Report Post  
Dave Peterson
 
Posts: n/a
Default

If you assign a shortcut key to a subroutine, you can see that shortcut key
assignment if you export that module.

I did this in module1.
Option Explicit
Sub testme()
MsgBox "hello"
End Sub

I exported it (right click on it in the project explorer)
And saw this in my favorite text editor:

Attribute VB_Name = "Module1"
Option Explicit
Sub testme()
MsgBox "hello"
End Sub


Now I went and assigned a shortcut key to that procedure (and added a
Description -- in that same dialog) and re-exported:

Now I see this:
Attribute VB_Name = "Module1"
Option Explicit
Sub testme()
Attribute testme.VB_Description = "my favorite function"
Attribute testme.VB_ProcData.VB_Invoke_Func = "K\n14"
MsgBox "hello"
End Sub

===
So this is something you can see when you export it, but it's not viewable (by
me anyway) in the VBE.

I closed the workbook and started another. I imported that code and the ctrl-K
shortcut key worked nicely for that workbook.

========

Are you looking to find the list of shortcut keys or are you trying to assign a
shortcut key in your code.

If you're looking for the latter, take a look at VBE's help for:

Application.macrooptions

(there's some shortcutkey stuff in there.)

If you're looking for a list, a little bit ago, someone (who???) wrote a
procedure to dump the modules and open them looking for that key value. You
could search google for, aw, heck.

Take a look at this thread:
http://google.co.uk/groups?threadm=7...ing.google.com
(one line in your browser)

Especially Ivan Moala's post.






Richard wrote:

The second question is: Where is the code that executes the macro with the
shortcut? I believe that it is embedded in the modules (something like
uponexecute?). Is this correct?

Thanks for the tip on the options selection. I never noticed it before.

"Dave Peterson" wrote:

Debra Dalgleish has some instructions with pictures at:
http://www.contextures.com/xlfaqMac.html#NoMacros

I don't understand the second question.

If you hit the shortcut key, it runs the macro.

And you can go back later to assign the macro.
Tools|macro|macros|select your macro
Options button



Richard wrote:

How do you get rid to the macro warning? I have deleted all macros in the
file and saved changes. When I reopen the file, the message still pops up.
When I go to the macro section, there are no macros to select. There are not
any in my personal workbook, or current open workbook.

Is this an issue of, once a macro is attached the warning message is
permanent?

Separate question:
Where is the code to execute the macro with a shortcut? I see the option
when creating, but have not found any code to carry out the command.


--

Dave Peterson


--

Dave Peterson
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
macro error when opening any file psp Excel Discussion (Misc queries) 1 January 31st 05 04:33 PM
Run a macro when opening a spreadsheet Duncan Help Excel Discussion (Misc queries) 5 January 10th 05 05:33 PM
disable macro warning kim Excel Discussion (Misc queries) 2 December 30th 04 05:57 PM
After deleting a macro, I still get the pop-up when opening file Anne Excel Worksheet Functions 2 December 8th 04 05:31 PM
Macro warning window Beema Excel Discussion (Misc queries) 1 December 2nd 04 05:33 PM


All times are GMT +1. The time now is 08:29 PM.

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

About Us

"It's about Microsoft Excel"