+ Reply to Thread
Results 1 to 6 of 6

macros open original file

  1. #1
    Registered User
    Join Date
    03-23-2020
    Location
    Seattle, USA
    MS-Off Ver
    365 business
    Posts
    15

    macros open original file

    We have a very large ss, thirty nine sheets and about twenty pages of macros. Saved the file as .xlsb to speed things up, but when we run a macro, it opens up the original .xlsm file and runs it there, not on the new file. We then saved the file as a .xlsm but under a different filename, and again, it opened the original file when any macro is run. Nowhere in any of the macros is the actual filename referenced, so where in the workbook is it pointing to the original file? Thanks,

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2407
    Posts
    26,156

    Re: macros open original file

    How do you run the macros? That is, how do you initiate them? Are they associated with buttons? Do you call them from the Developer > Macros > Run interface?

    Ideally you should provide the file but it may be over the size limit. You can attach a .xlsb file up to 9.7MB.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    03-23-2020
    Location
    Seattle, USA
    MS-Off Ver
    365 business
    Posts
    15

    Re: macros open original file

    We have made a custom ribbon with the macros assigned there. The xlsm version is just over 100M, the xlsb is about 40M
    Attached Images Attached Images

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2407
    Posts
    26,156

    Re: macros open original file

    Macros in the ribbon or the QAT are bound to a specific file, not whatever file is currently open. I am assuming that the file does not build and load the ribbon customizations dynamically when it starts, but rather you have set this up in advance. If you right click anywhere on the ribbon, select Customize the Ribbon, and then hover the mouse over the custom command, you will see what file it refers to.

    Hover to see macro location in ribbon QAT custom command.jpg

  5. #5
    Registered User
    Join Date
    03-23-2020
    Location
    Seattle, USA
    MS-Off Ver
    365 business
    Posts
    15

    Re: macros open original file

    Learn something new every day .. So it was pretty easy to simply make a new custom ribbon and everything works fine, thanks for that

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2407
    Posts
    26,156

    Re: macros open original file

    If your question has been answered please mark your thread as "Solved" so that members will know by looking at the thread title that your problem is solved. Go to the menu immediately above your first post to the thread and click on Thread Tools. From the dropdown menu select "Mark this thread as solved..."

    If a member helped you solve your problem, consider adding to their reputation by clicking addreputationiconsmall.jpg below their name.

+ 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. Replies: 8
    Last Post: 12-02-2019, 03:42 PM
  2. Replies: 1
    Last Post: 04-26-2018, 11:44 AM
  3. [SOLVED] Open file via VBA and paste filename in original file
    By kammend in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-03-2016, 09:29 AM
  4. Delete a file that has just been saved and open original file or vice versa.
    By SHB19 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-17-2015, 07:48 AM
  5. Macro to keep original file open, not 'save as' file
    By LonestarGuy in forum Excel General
    Replies: 4
    Last Post: 06-09-2010, 03:53 PM
  6. Replies: 1
    Last Post: 07-02-2009, 05:51 PM

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