+ Reply to Thread
Results 1 to 4 of 4

How to run a macro from another workbook?

  1. #1
    Registered User
    Join Date
    04-13-2011
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    19

    How to run a macro from another workbook?

    I have two excel reports. One excel Report named as Report1.xlsb, contains a button called "Apply Filters". I want to click that button by writing a macro in another workbook. I tried to click the button by using the name used in the macros available in Report1.xlsb.
    I have tried with below code. But its not working. Its throwing below error
    Please Login or Register  to view this content.
    Please advise me if i missed something.
    Last edited by amarendra19; 05-16-2011 at 12:30 AM.

  2. #2
    Forum Contributor
    Join Date
    05-09-2009
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    315

    Re: How to run a macro from another workbook?

    Forecast Operational Report ES.xlsb' must be open to run any code within it.

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: How to run a macro from another workbook?

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here

    mojo249, please help us with the Rules by not answering a question that obviously infringes them.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Registered User
    Join Date
    04-13-2011
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: How to run a macro from another workbook?

    Hi,
    I have written VBA Macro for this which is in some other Excel. And my report is different excel.
    I am virtually opening the report excel sheet and trying to Click the "Apply Filter" Button in this sheet. Then i will put the timer before clicking the button and then put the end timer.In this way i will calculate. But below code is not able to click the "Apply Filters" button on that sheet. Please advice me if i miss somthing.

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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