Consulting

Results 1 to 2 of 2

Thread: CallByName Fucntion

  1. #1

    CallByName Fucntion

    I would like to call different module. For example, module1, module2 and module3.

    Instead of call it one by one. I would like to call it in the for next loop. I.e.

    For i = 1 to 3

    Call "Module" & i

    Next i

    However, the call function cannot use for variable name. I learn that what I need to use is CallByName function. However, I cannot find an appropriate example from help. Is there any example to share with me for the CallByName function??

    Many Thanks,

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    [vba]

    For i = 1 to 3

    Application.Run "Module" & i

    Next i
    [/vba]

Posting Permissions

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