Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Pass multiple parameters through macros

I want to pass more than one parameter through a
procedure. Ex.
Sub AAAAquery()
Dim queryname
Dim querynumber
Dim testname


Sub BBBBquery()

AAAAquery (queryname)

I can pass the defined variable queryname through. I want
to add testname. Ex.
Sub BBBBquery()

AAAAquery (queryname, testname)
This does not work.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Pass multiple parameters through macros

Hi

Sub Main()
Call PassedToMe("Yo", 42, DateSerial(1944, 12, 5))
End Sub

Sub PassedToMe(S As String, L As Long, D As Date)
MsgBox "You said " & S & Chr(10) & _
"and the lucky number is " & L & Chr(10) & _
"and you were born " & D
End Sub

HTH. Best wishes Harald


"Chris Perry" skrev i melding
...
I want to pass more than one parameter through a
procedure. Ex.
Sub AAAAquery()
Dim queryname
Dim querynumber
Dim testname


Sub BBBBquery()

AAAAquery (queryname)

I can pass the defined variable queryname through. I want
to add testname. Ex.
Sub BBBBquery()

AAAAquery (queryname, testname)
This does not work.



Reply
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
lookup by multiple parameters NatashaS Excel Worksheet Functions 2 July 10th 08 06:48 PM
how to pass on different parameters to VBA Code? Ahmaq Excel Worksheet Functions 2 April 22nd 07 04:30 AM
Can't get parameters on macros working... Rob Nicholson Excel Programming 6 February 24th 04 11:10 AM
Starting Excel from cmd pmpt, pass parameters Jerry G. Slater Excel Programming 2 February 5th 04 05:38 AM
How to pass variable value between macros BCS Excel Programming 0 July 25th 03 08:01 PM


All times are GMT +1. The time now is 10:53 AM.

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

About Us

"It's about Microsoft Excel"