+ Reply to Thread
Results 1 to 3 of 3

Code is working fine in debug step through but won't run - help please

  1. #1
    Registered User
    Join Date
    01-17-2019
    Location
    Melbourne Australia
    MS-Off Ver
    2016
    Posts
    10

    Code is working fine in debug step through but won't run - help please

    The attached code has lots of probably redundant steps that are my attempts to resolve this issue. I'm not that worried about them as I can unwind them if I get the basic thing to work.

    My issue is that the code won't run, leaving me in the file I'm getting data from rather than returning to my target file and completing. The oddity is that it works without error messages if I "F8" through each step. I have tried to follow other posts having the same problem, but I don't understand the solutions or why this is happening.

    The context is I am working within a file and would like to open a second file, gather data from various spots, and either add or update a summary data list in my original file. If working correctly the second / data source file is left unchanged and closed.

    Thank you



    Please Login or Register  to view this content.
    Last edited by Albert Toet; 05-14-2019 at 05:38 AM.

  2. #2
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Code is working fine in debug step through but won't run - help please

    What do you mean by the "code won't run"?

    Does the code actually execute or not? Set a break point and try to run it to confirm.

  3. #3
    Registered User
    Join Date
    01-17-2019
    Location
    Melbourne Australia
    MS-Off Ver
    2016
    Posts
    10

    Re: Code is working fine in debug step through but won't run - help please

    Thanks, I wasn't familiar with adding a break to the macro.
    Yes - the problem is it won't execute fully. It writes the first cell and opens the remote file and then seems to fall over on opening the Sheet "BASIC"
    I have been testing slight changes and have marked those changes with an EDIT comment in the script above.

    Confirming, this script will execute fully when debug stepping through (F8)

+ 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. [SOLVED] Code to Hide or Unhide Columns Not Working - Help to Debug
    By ckiwan in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-11-2019, 11:00 AM
  2. [SOLVED] Code skips on Run Mode but runs fine on F8 (Debug Mode)
    By RaquelAR in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-25-2013, 01:05 PM
  3. URGENT: Macro That Worked Fine Not Working Now - No Changes Made To Code
    By stevevb in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 05-19-2013, 05:49 PM
  4. Macro Runs fine in debug but not from ComboBox
    By jaslake in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 02-25-2009, 10:17 AM
  5. Replies: 0
    Last Post: 12-18-2008, 05:06 AM
  6. [SOLVED] Works fine in debug, but...
    By DiBaco in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-24-2006, 12:40 PM

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