Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Run/execute VBS and pass arguments

Is there a way in VBA to run/execute a visual basic script.

I need to do the following:
Test.vbs arg1 arg2

All help is appreciated.



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Run/execute VBS and pass arguments

Do you have to run the VBS script, or could you embed the VBS in VBA (it is
almost identical)?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Claud Balls" wrote in message
...
Is there a way in VBA to run/execute a visual basic script.

I need to do the following:
Test.vbs arg1 arg2

All help is appreciated.



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Run/execute VBS and pass arguments

The .vbs file is very large, and I ran across several errors when I
copied the code into a vba macro.


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Run/execute VBS and pass arguments

I got it working, I used:

Shell ("cscript //nologo H:\Excel\WritePerms.vbs ACTION=SHOW TARGET=" &
ActiveWorkbook.FullName)



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
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
How to pass variables as arguments of a function Excel-craze Excel Worksheet Functions 1 August 12th 09 11:48 AM
Can I pass arguments to my formatted empty spreadsheet file? Paul H[_2_] Excel Discussion (Misc queries) 3 July 25th 09 07:34 PM
Execute a program from within VBA [email protected] Excel Programming 1 January 29th 05 10:15 AM
Could not execute Gary Excel Worksheet Functions 1 December 20th 04 06:20 PM
How to pass arguments from ThisWorkbook to a UserForm strataguru[_4_] Excel Programming 1 October 7th 03 11:29 PM


All times are GMT +1. The time now is 10:21 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"