Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Nov 2004
    Location
    Lexington Park, Maryland, USA
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Excel-VBA Referring to Modules (VBA-Excel)

    I have multiple Excel workbooks with multiple modules in each workbook. How do I refer to a module from a different workbook? Create_Input_ASAP is a public Sub in a module in the ASAP.xls file. Here is what I have and this does not work:

    Workbooks("ASAP.xls").Create_Input_ASAP

  2. #2
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel-VBA Referring to Modules (VBA-Excel)

    Use

    Application.Run "Otherbook.xls!SubName"

    (untested)
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

Posting Permissions

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