Consulting

Results 1 to 4 of 4

Thread: Solved: Sending arguments to macro in Personal.xls

  1. #1
    VBAX Mentor Marcster's Avatar
    Joined
    Jun 2005
    Posts
    434
    Location

    Question Solved: Sending arguments to macro in Personal.xls

    RE: http://vbaexpress.com/forum/showthread.php?t=7008


    How do you pass arguments to the macro?
    I've tried:

    Run ("PERSONAL.XLS!RemoveAllVBACode(wb)")
    Run ("PERSONAL.XLS!RemoveAllVBACode wb")

    None work.

    Set wb = ActiveWorkbook

    The modue name in PERSONAL.XLS is:
    ModRemoveAllVBACode


    Thanks,

    Marcster.

  2. #2
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    Go for .. [VBA]Run ("PERSONAL.XLS!RemoveAllVBACode",wb)[/VBA](assuming wb is a variable)
    Enjoy,
    Tony

    ---------------------------------------------------------------
    Give a man a fish and he'll eat for a day.
    Teach him how to fish and he'll sit in a boat and drink beer all day.

    I'm (slowly) building my own site: www.WordArticles.com

  3. #3
    VBAX Master XLGibbs's Avatar
    Joined
    Jan 2006
    Location
    state of confusion, but vacation in denial
    Posts
    1,315
    Location
    Run ("PERSONAL.XLS!'RemoveAllVBACode wb'")

    Encapsulate both macro name and variable in ' tick marks..

    Since they are in personal.xls you can also try

    Call RemoveAllVBACode wb
    If you have posted the same question at multiple forums, please read this IMPORTANT INFO.

    Please use the thread tools to mark your thread Solved


    Please review the Knowledge Base
    for samples and solutions , or to submit your own!




  4. #4
    VBAX Mentor Marcster's Avatar
    Joined
    Jun 2005
    Posts
    434
    Location
    Sorted it:

    Run "PERSONAL.XLS!RemoveAllVBACode", wb

    Thanks,

    Marcster.
    Last edited by Marcster; 02-08-2006 at 07:26 AM.

Posting Permissions

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