Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How do I include wsh or vbs code/script in an Excel macro

I want to include a wsh or vbs script code in a macro so that it runs
at the button onclick event. How do I include the script.

TIA
NM
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default How do I include wsh or vbs code/script in an Excel macro

For WSH, you need to cretae a WSH object

Set WSH = CreateObject("WScript.Shell")

and then precede your WSH object and methods with WSH, like so

Select Case WSH.Popup("Please wait", cTime, "Hint", vbOKCancel)


VBScript is so VBAish, that you could probably use as is.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Naived Merchant" wrote in message
om...
I want to include a wsh or vbs script code in a macro so that it runs
at the button onclick event. How do I include the script.

TIA
NM



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 generate a text file from Excel using a macro or script? Frank Excel Discussion (Misc queries) 1 January 6th 08 05:11 PM
How to generate a text file from Excel using a macro or script? Frank Excel Discussion (Misc queries) 0 January 6th 08 05:11 PM
How do I set up a macro to excel that include the e-mail address vmr Excel Discussion (Misc queries) 1 August 23rd 05 10:07 PM
Excel 2000/XP script to Excel97 script hat Excel Programming 3 March 2nd 04 03:56 PM


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