Excel 2010 Macro mysteriously stops running after command Workbooks.Open("WorkbookFullName")

Posted on 2013-10-02
Medium Priority
Last Modified: 2013-10-03
Before I break down a workbook to send over....

Has anyone come across this odd phenomenon?

The Workbooks.Open ("Name") command opens and activates the named file.
At this point the macro just stops running.

The next command is to  activate a specific sheet within the open workbook.

I have tried debugging the code.  It runs perfectly when run line by line.

I have tried transferring the command to a new sub routine and calling it from the original routine, to no avail.

is this a recognised phenomenon for excel VBA?  I have tried searching, without much illumination.

Thanks experts

Question by:David Phelops
  • 2
  • 2
LVL 85

Accepted Solution

Rory Archibald earned 2000 total points
ID: 39539659
Are you running the macro using a keyboard shortcut that involves the Shift key? If so, change it to not use the Shift (it's a bug).

Author Closing Comment

by:David Phelops
ID: 39539710
Oh. My. God!

I think that this is the first time I have actually cried with relief when coming across a solution to a VBA problem.  

Thanks so much.  you have helped save a man's sanity today!

Can I award 10,000 points?
LVL 85

Expert Comment

by:Rory Archibald
ID: 39539806
No, you can't - but that kind of thank you is worth far more to me!

Glad I could help. :)


Author Comment

by:David Phelops
ID: 39542540
Again, thanks Rory.  I look forward to more wisdom

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

587 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question