ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Unable to get macro hotkey to work (https://www.excelbanter.com/excel-programming/307866-unable-get-macro-hotkey-work.html)

Relvinian

Unable to get macro hotkey to work
 
Hey all,

I'm using Excel 2003 and I'm unable to get my macro (with a hotkey assigned) to execute fully. Here's my macro which will stop after the 'open' command. It doesn't display the 2nd message box.

Sub DoIt()
MsgBox "Testing #1"
Workbooks.Open ("C:\Testing.xls")
MsgBox "Testing #2"
End Sub


I have this macro assigned to a hotkey (CTRL+SHIFT+D). It will execute as far as opening the workbook but then stop running. It won't execute anything after the Open command. If I put a break point on the first message box, it execute just fine (all the way through). If I create a toolbar and assigned a button on that toolbar to execute this macro, all is well --- just not through the hotkey.

What am I doing wrong?

Relvinian


Tom Ogilvy

Unable to get macro hotkey to work
 
If you use Shift as part of the hotkey, then use a hotkey that does not
include shift.

--
Regards,
Tom Ogilvy

"Relvinian" wrote in message
...
Hey all,

I'm using Excel 2003 and I'm unable to get my macro (with a hotkey assigned)
to execute fully. Here's my macro which will stop after the 'open' command.
It doesn't display the 2nd message box.

Sub DoIt()
MsgBox "Testing #1"
Workbooks.Open ("C:\Testing.xls")
MsgBox "Testing #2"
End Sub


I have this macro assigned to a hotkey (CTRL+SHIFT+D). It will execute as
far as opening the workbook but then stop running. It won't execute
anything after the Open command. If I put a break point on the first
message box, it execute just fine (all the way through). If I create a
toolbar and assigned a button on that toolbar to execute this macro, all is
well --- just not through the hotkey.

What am I doing wrong?

Relvinian





All times are GMT +1. The time now is 12:53 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com