![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Posts: 128
|
I have created a sub in a module like this:
Sub mysub(strArg1, strArg2) msgbox strArg1 msgbox strArg2 End Sub Then when I try to call that sub from a place outside that module like this: mysub(strArg1, strArg2) I got the following error: Compile error: Expected: = When I create a similar sub but with only one argument I don't get that error. So how do I call a sub with multiple arguments? Anyone know? |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Sunny, spring-like Hull
Posts: 3,339
|
Nearly answered it yourself
Call MySub(Param1, Param2) or MySub Param1, Param2 |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Posts: 128
|
Thanks, that worked!
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|