Unable to get macro hotkey to work

R

Relvinian

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
 
T

Tom Ogilvy

If you use Shift as part of the hotkey, then use a hotkey that does not
include shift.

--
Regards,
Tom Ogilvy

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top