Results 1 to 2 of 2
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Call a Subroutine Using Variable (XP)

    Is it possible to call a subroutine using a variable? I can not get it to pass the variable while trying to call the sub.

    As an example:

    Start()
    oProcedure = "_01"

    Call Subroutine & oProcedure

    End Sub

    Subroutine_01()
    End Sub

    Subroutine_02
    End Sub


    Thanks,
    John

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Call a Subroutine Using Variable (XP)

    Try:
    Application.Run ("Subroutine" & oProcedure)

    [Note: you need to add "Sub " before the subroutine names]

    Steve

Posting Permissions

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