+ Reply to Thread
Results 1 to 5 of 5

When stepping through code using F8, macro automatically runs at Workbooks.Open line

Hybrid View

excelji When stepping through code... 06-20-2014, 09:06 AM
MarvinP Re: When stepping through... 06-20-2014, 09:09 AM
excelji Re: When stepping through... 06-20-2014, 09:57 AM
MarvinP Re: When stepping through... 06-21-2014, 04:53 PM
excelji Re: When stepping through... 06-25-2014, 03:22 PM
  1. #1
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,236

    Re: When stepping through code using F8, macro automatically runs at Workbooks.Open line

    Hi exelji and welcome to the forum.

    Try putting a DoEvents before and after the Workbooks.Open line in your code. See if that fixes the problem.
    http://support.microsoft.com/kb/118468
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  2. #2
    Registered User
    Join Date
    03-12-2014
    Location
    Newfoundland, Canada
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: When stepping through code using F8, macro automatically runs at Workbooks.Open line

    Thanks MarvinP. I read the MS article, though I don't fully understand all the technical parts. I tried your suggestion and it's definitely going to save me from a lot of frustraion. But I am now wondering why this would suddenly begin happening to my code? I have been writing VBA for years and don't remember having this issue. Does it have anything to do with Windows 7. I don't recall if this started happening immediately after I got a new work laptop with Windows 7 back in November but I don't have the problem on my WinXP computer at home.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Vba code to run my macro in all open workbooks
    By prabhuduraraj09 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-13-2014, 04:00 AM
  2. Problem Single-Stepping Through workbooks.open
    By StevenHB in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-11-2012, 10:05 PM
  3. Workbooks automatically open macro
    By longbow007 in forum Excel General
    Replies: 0
    Last Post: 06-16-2010, 08:58 PM
  4. Code should runs once per line
    By Crispie38 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-02-2007, 06:42 AM
  5. macro or code to open multiple workbooks
    By Duane Reynolds in forum Excel General
    Replies: 1
    Last Post: 03-14-2006, 04:25 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1