+ Reply to Thread
Results 1 to 5 of 5

Error when calling macro

  1. #1
    Registered User
    Join Date
    04-02-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    96

    Error when calling macro

    Hello,

    Got an issue with a macro, in that when I use the "Call" function to run a macro I get a compile error saying "Invalid use of property", but for some reason it only does this with one particular macro and works fine when trying to call any other macro.

    Any ideas why this could be?

    Any help would be much appreciated.

    Jamer

  2. #2
    Registered User
    Join Date
    04-02-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    96

    Re: Error when calling macro

    Just noticed this seems to be because the macro, for some reason, changed its name to this format...WorbookName.xlsm!Module4.MacroName...any ideas why this has happened?

  3. #3
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Error when calling macro

    jamer02,

    Are both macros in the same workbook?


    Can you post both macro codes?


    If posting VBA code, please use Code Tags - like this:

    [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code]
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  4. #4
    Registered User
    Join Date
    04-02-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    96

    Re: Error when calling macro

    Both macros are in the same workbook yes. I can call the macro if I tell the code what module the macro is in, would prefer not to do this if there is a way of changing this?

  5. #5
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Error when calling macro

    jamer02,

    Can you attach your workbook?

    To attach your workbook, scroll down and click on the Go Advanced button, then scroll down and click on the Manage Attachments button.


    If I can not see your workbook, or the macro code, then:

    In the Quick Reply box, just put the word BUMP. Then, click on the Post Quick Reply button, and someone else will assist you.

+ 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