Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Passing Arguments to VBA Procudures

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,698
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Passing Arguments to VBA Procudures
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Passing Arguments to VBA Procudures - 10/7/2002 4:41:58 PM   
  marcuscus

 

Posts: 1
Score: 0
Joined: 10/7/2002
From: United Kingdom
Status: offline
Hi all,

This may be a daft question (I'm begineer) but is it possible to pass variables to a VBA procedure from a VBScript?

For example...

Dim name
Dim excel
Set excel = CreateObject("Excel.Application")
excel.Visible = True
excel.Workbooks.Open( "E:\test.xls" )
name = "Marco"
Call excel.Run( "test.xls!PrintName", name )


Where the VBA function is...

Sub PrintName( name As String )
MsgBox name
End Sub

Thanks for any help,
Marco
 
 
Post #: 1
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Passing Arguments to VBA Procudures Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts