+ Reply to Thread
Results 1 to 4 of 4

call Subroutine

  1. #1
    Registered User
    Join Date
    03-19-2015
    Location
    iraq
    MS-Off Ver
    2013
    Posts
    99

    call Subroutine

    hi
    if i have Subroutines

    sub aaa1()
    ----
    ------
    end sub



    sub aaa2()
    -------
    -------
    end sub



    how to call them with sub name & i

    i = 1

    call "aaa" & i



    it gives me error

    i used run "aaa" & i it gives me error

    i used application.run "aaa" & i it gives me error
    Last edited by mena; 05-11-2018 at 07:09 AM.

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: call Subroutine

    You need to wrap with an apostrophe when number comes at the end of the sub name.
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-19-2015
    Location
    iraq
    MS-Off Ver
    2013
    Posts
    99

    Re: call Subroutine

    thank you very much jindon great
    Last edited by mena; 05-11-2018 at 07:29 AM.

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: call Subroutine

    You are welcome and thanks for the rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Building a subroutine call tree
    By chucklod in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-08-2014, 06:15 PM
  2. Can't call Subroutine with string variable name
    By TryToExcel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-03-2010, 02:21 PM
  3. Keyword Call when invoking a subroutine
    By Jeroen1000 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-19-2009, 06:32 AM
  4. How to call a subroutine in another workbook
    By dgarris in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-04-2008, 10:30 AM
  5. Call subroutine from another workbook
    By DejaVu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-03-2005, 12:12 PM
  6. subroutine call with arguments
    By gabe in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-11-2005, 06:21 PM
  7. Call Subx for excel 97 Add-In subroutine
    By Dave D-C in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-02-2005, 05:06 PM

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