LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default passing multiple strings to a function

It seems that it is not possible to pass multiple string arguments to a
function in vba.
I am using vba in Excel 2000.
Why does this not work?

Dim testStr1
Dim testStr2

testStr1 = "hi"
testStr2 = "there"

' I get a compile error on the next statement
TestSub(testStr1, testStr2)


Sub TestSub(str1 as String, str2 as String)

MsgBox(str1 & str2)

End sub



Thanks,

Tijmen


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing Strings from UserForm to Module John Kauffman Excel Programming 3 May 28th 04 05:01 PM
Passing array of strings from DLL function to VBA Jag Man Excel Programming 0 January 12th 04 10:09 PM
passing strings vba man Excel Programming 0 December 21st 03 07:12 PM
passing strings pabs[_7_] Excel Programming 2 December 19th 03 06:25 PM
passing strings Sirron Excel Programming 2 August 27th 03 04:33 PM


All times are GMT +1. The time now is 01:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"