+ Reply to Thread
Results 1 to 5 of 5

something more fast then that...openfile-refresh-save-close

  1. #1
    Registered User
    Join Date
    11-09-2021
    Location
    spain
    MS-Off Ver
    365
    Posts
    6

    something more fast then that...openfile-refresh-save-close

    hi guys!

    this macro is little bit inefficient, need 2 seconds for every file...and for >300files is slow.
    I need to update the stock price in every file (2 or 3 times every day) and then send other data calculated in theese file with new prices to another excel to compare all selected data.
    Can you optimize that?
    thanks
    Alessio

    Please Login or Register  to view this content.

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: something more fast then that...openfile-refresh-save-close

    Why have you included
    Please Login or Register  to view this content.
    That seems unnecessary here

    You should also stop all events and calculations before you start the loop and reset them after you the loop is completed
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: something more fast then that...openfile-refresh-save-close

    Your code modified
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    11-09-2021
    Location
    spain
    MS-Off Ver
    365
    Posts
    6

    Re: something more fast then that...openfile-refresh-save-close

    thanks Kebe!!! It works very well, I need to put Workbooks(Dir(Myfile)).RefreshAll for refresh the stock price of every file...but is more fast!!

  5. #5
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: something more fast then that...openfile-refresh-save-close

    Okay, clear, well, happy it speeded it up

+ 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. Open, Refresh, Save, and Close linked Excel file
    By Hodor84 in forum Access Programming / VBA / Macros
    Replies: 2
    Last Post: 02-19-2017, 08:03 AM
  2. Open, Refresh, Save, and Close linked Excel file
    By Hodor84 in forum Access Tables & Databases
    Replies: 0
    Last Post: 02-15-2017, 03:23 PM
  3. Refresh all data connections, save and close
    By izk630 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-27-2016, 10:58 AM
  4. Need macro to open, refresh, save, close 50 workbooks in a folder.
    By paulcg in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-11-2012, 09:23 AM
  5. Auto Open, Refresh, Save, Close
    By Jimmycooker in forum Excel General
    Replies: 0
    Last Post: 02-06-2006, 09:34 AM
  6. [SOLVED] save & close after web query refresh
    By JVLin in forum Excel General
    Replies: 0
    Last Post: 09-28-2005, 12:05 PM
  7. Auto Open file VBA Refresh MS Query Save Close
    By gcutter in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-26-2005, 11:05 AM

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