MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Shortcut Key Does NOT Run Macro


Posted by Eileen on June 12, 2000 7:42 AM

I have my macro created, I can run it with the "tools/macros/run button," and I have the options set up for Ctrl+Shft+G. It runs perfectly with the long method but gets hung-up with the shortcut key.

Has anyone run across this scenario before and if so, how did you resolve it?


Posted by Garry on June 12, 0100 8:19 AM

Sorry,
Eileen, I have tried a test macro with the same keystroke, mine works okay. Please can you reply with more details on the macro being executed.

Posted by Greg Mitchell on June 15, 0100 9:09 AM

I found the problem's solution in the Microsoft Knowledgebase -sorta. The problem stems from the fact that the shift key is part of the shortcut. The knowledgebase link is:

http://support.microsoft.com/support/kb/articles/Q175/2/23.ASP?LN=EN-US&SD=gn&FR=0

I guess it's just a matter of choosing different shortcut keys.

Greg
--
Greg Mitchell
Programmer
Potash Corporation of Saskatchewan
Greg.Mitchell@potashcorp.com
-------------------------------------------------

Posted by Eileen on June 12, 0100 10:10 AM

Sure! The macro opens a CVS file, highlights columns A-K, copies, goes back to the original spreadsheet and pastes. When I run it with the shortcut, it opens the CVS file then stalls. As I've mentioned, it works perfectly when I do the "tools/macros/run button."


Posted by Greg Mitchell on June 14, 0100 10:59 AM


Interestingly enough, I have just run into the same issue myself today. To add another twist to it, if the filname is chosen with "Application.GetOpenFilename(...)" the macro executes completely with the shortcut key.

The problem seems to occur when using a constant filename. I haven't been able to find a way to resolve this either :(

I'm actually importing a text-file that is fixed width, and it does break the file into the right columns, it just doesn't do anything else after that (Basically just adding titles to the columns)

Anyone have any ideas? We're all stumped over here.

Greg Mitchell
Programmer
Potash Corporation of Saskatchewan
Greg.Mitchell@potashcorp.com
-------------------------------------------------