+ Reply to Thread
Results 1 to 4 of 4

Excel Macro calling from Original Code Location Spreadsheet

  1. #1
    Registered User
    Join Date
    08-09-2022
    Location
    United States
    MS-Off Ver
    Version 2206
    Posts
    4

    Question Excel Macro calling from Original Code Location Spreadsheet

    I have a "Builder" Workbook that is bringing in external sheets from other workbooks. The end result is a workbook compiled of quotes and other documents that salesman require for a system project.
    Fundamentally, All the code works. After a "Sheet" has been brought into the "Builder" when a button is used in the new workbook the original workbook the sheet was copied from is opening to run the code.

    I have tried removing code from module and putting it under Sheet Objects and Re-Assigning Macros to buttons but this does not solve my problem.


    My only code experience is 1 C++ class in high school.

  2. #2
    Valued Forum Contributor
    Join Date
    05-03-2022
    Location
    Halifax,Canada
    MS-Off Ver
    365
    Posts
    326

    Re: Excel Macro calling from Original Code Location Spreadsheet

    Hello WFIR;
    One thing that comes to mind is that there may be a reference to the other workbook.
    Goto your VBEditor and check for a reference in the project explorer.

    If this is the issue you can goto "Tools...References" and unclick that reference ... if not needed.

    See example of reference in screen shot .




    scrShot012.gif


    if this has helped please click "Add reputation"

  3. #3
    Registered User
    Join Date
    08-09-2022
    Location
    United States
    MS-Off Ver
    Version 2206
    Posts
    4

    Re: Excel Macro calling from Original Code Location Spreadsheet

    I don't have that reference activated unfortunately.
    Once I bring a sheet to the "Builder" if i look at the macro assigned to the button it references the original workbook it came from.
    I believe VBA is just not able to do what i was trying to do.

    To temporarily solve my problem I have set up a workbook that I am using strictly for my routines. All buttons I use will come from that workbook and every routine will end with closing said workbook.
    This will also make it easier to update the routines without having to edit each of the hundreds of Base Machine quote files down the road.

  4. #4
    Valued Forum Contributor
    Join Date
    05-03-2022
    Location
    Halifax,Canada
    MS-Off Ver
    365
    Posts
    326

    Re: Excel Macro calling from Original Code Location Spreadsheet

    Hello WFIR:
    You may want to look into having a workbook as an "AddIn" . Or adding your needed macros to your Personal.xlb.
    Either of these options will allow you access to macros that are not in the local book but you're not seeing additional workbooks being opened.
    Just and idea

+ 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: 6
    Last Post: 09-18-2015, 04:19 PM
  2. Code that works in one location but not another location. (AdvancedFilter excel function)
    By 111StepsAhead in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-29-2013, 02:18 PM
  3. code to move cells back to thier original location
    By twofootgiant in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-28-2011, 07:32 AM
  4. Replies: 7
    Last Post: 12-19-2008, 10:57 PM
  5. Get original cell value before calling a UDF
    By xlMaster in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-11-2008, 11:24 AM
  6. Original Author of spreadsheet (Excel)
    By Bazmundo in forum Excel General
    Replies: 3
    Last Post: 11-04-2008, 09:31 AM
  7. [SOLVED] Calling an excel spreadsheet from within a browser
    By JD in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-09-2005, 01:06 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