+ Reply to Thread
Results 1 to 4 of 4

Call a sub from another a sub located in another workbook

  1. #1
    Forum Contributor
    Join Date
    06-24-2013
    Location
    Berlin
    MS-Off Ver
    Excel 2007
    Posts
    188

    Call a sub from another a sub located in another workbook

    Hi Everyone,

    I would like to call a macro from Workbook 1 that is located in another workbook (let's call it workbook2)

    I saw that I could use the following:

    application.run Workbookname!SubName

    however my workbook will have a different name everyday as it contains the date within its name. (ie workbook20140619, tomorrow it would be Workbook20140620)

    Would you know how to do that ?

    Thanks in advance for your help.

  2. #2
    Forum Contributor pareshj's Avatar
    Join Date
    05-20-2014
    Location
    MUMBAI
    MS-Off Ver
    2007 & 2010
    Posts
    447

    Re: Call a sub from another a sub located in another workbook

    Hi,

    You can use the following code :

    Please Login or Register  to view this content.


    Regards,
    Paresh J
    Click on "* Add Reputation" as a way to say thanks

  3. #3
    Forum Contributor
    Join Date
    06-24-2013
    Location
    Berlin
    MS-Off Ver
    Excel 2007
    Posts
    188

    Re: Call a sub from another a sub located in another workbook

    Thanks Paresh, let me try that.

  4. #4
    Forum Contributor
    Join Date
    06-24-2013
    Location
    Berlin
    MS-Off Ver
    Excel 2007
    Posts
    188

    Re: Call a sub from another a sub located in another workbook

    Awesome that worked!

+ 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. Master Command Button to call on other Command Buttons located in other Workbooks
    By MrNickRegan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-05-2013, 07:57 PM
  2. Pull info from excel workbook located on another computer.
    By westwegoman in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-12-2010, 12:44 AM
  3. Replies: 8
    Last Post: 11-20-2008, 04:39 PM
  4. How to reference a Class Module located in an add-in or another workbook?
    By keithb in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-09-2005, 09:05 PM
  5. [SOLVED] Source for a dropdown list located in external workbook: how to?
    By keithb in forum Excel General
    Replies: 1
    Last Post: 08-02-2005, 02:05 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