+ Reply to Thread
Results 1 to 3 of 3

Macro works when using F8-"step into" line by line, but not when executing the full macro?

  1. #1
    Registered User
    Join Date
    06-09-2012
    Location
    Belgium
    MS-Off Ver
    Office 365
    Posts
    7

    Macro works when using F8-"step into" line by line, but not when executing the full macro?

    Hello everyone,

    I have a mysterious problem:
    • I have made a macro (sub) called "ReloadRefresh". This macro calls other macro's I made, for example the macro "numberconversion". (view code below)
    • When I walk through the entire macro and its embedded macro's line by line using the F8-step functionality for debugging, everything the code is designed for, is executed as it should.
    • BUT when I just run the whole macro from the "macros" menu in Excel, the result is totally different. I don't understand why and how to fix it, I hope someone recognises this

    These are the 2 macro's and their functionality:
    The objective of my Excel project is to import stock data from the web. I have a few sheets with a data link to a website, so this data has to be refreshed. That's what the activeworkbook.refreshall is supposed to do: import all the data from today into the sheet. Then, because its an English website and I'm european, data and number formats need to be converted, so for every sheet I do this with the "numberconversion macro". But as described, it only works correctly when I walk through the code line by line, not if I call the ReloadRefresh Macro. Help!? :-)

    Please Login or Register  to view this content.

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    06-04-2013
    Location
    Moscow
    MS-Off Ver
    Office 365
    Posts
    100

    Re: Macro works when using F8-"step into" line by line, but not when executing the full ma

    Try add the wait:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-09-2012
    Location
    Belgium
    MS-Off Ver
    Office 365
    Posts
    7

    Re: Macro works when using F8-"step into" line by line, but not when executing the full ma

    Superb, that works like a charm! Thank you "The_prist"!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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