+ Reply to Thread
Results 1 to 2 of 2

macro not running in macro enable workbook

  1. #1
    Registered User
    Join Date
    09-27-2012
    Location
    Warrington, England
    MS-Off Ver
    Excel 2007
    Posts
    27

    macro not running in macro enable workbook

    Hi, need some advice on the following in Excel 2007. I progamatically add a module and code to another existing macro-enabled workbook (Book2) and call the procedure from Book1 with

    Please Login or Register  to view this content.
    The odd thing is this works corrrectly with some workbooks but not with others. I get an error message saying that the macro may not be available or all macros are disabled. But the original macros in Book2 and the new one added progamatically by Book 1 will all run correctly when run from Book2. I've previously saved Book2 to a different location using:

    Please Login or Register  to view this content.
    where wbTarget is Book2 and BASFilePath & SelectedWB is the path and filename. This works ok for all workbooks.

    Can anyone suggest what the solution might be? Is there a way to programmatically enable all macros in Book2? Thanks in advance

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: macro not running in macro enable workbook

    perhaps you have spaces in the workbook name-better to use
    Please Login or Register  to view this content.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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