Results 1 to 2 of 2

Thread: VBA Help
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular
    Join Date
    Aug 2018
    Posts
    79
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default VBA Help

    Hi,

    I have a macro that selects a different excel workbook and copies all the data from the opened workbook into the existing. See below:

    Set Wbk1 = ActiveWorkbook
    Fname = "L:\GCRE\Financial Modeling.xlsm"
    Set Wbk2 = Workbooks.Open(Fname)
    Wbk2.Sheets(1).Copy , Wbk1.Sheets(Wbk1.Sheets.Count)
    Wbk2.Close False


    Now, the code works. However, the workbook I am opening is also a macro-enabled workbook, which refreshes 3 different workbooks using Power Query in Excel. All 3 workbooks are refreshed and appended into the Financial Modeling.xlsm. The problem is, the workbooks aren't getting refreshed. Was wondering if anyone had an idea why?

  2. #2
    New Member
    Join Date
    Aug 2019
    Posts
    16
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: VBA Help

    You could create a macro to refresh them and call that one from your existing macro posted here. If it supposed to run on workbook open event automatically, then you need to add a wait for calculations event in the macro posted to wait for them to be refreshed before copying the data over.

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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