Difference between VBS and VBA
Solved
Hello,
I’m starting with VB and I’m having trouble creating VBS scripts that interact with Excel. VBA and VBS syntax are not the same, and when I try to take VBA code and put it into a script I get errors. Is there any help on the differences between VBS and VBA?
I’m a bit lost
Thank you for your help
Configuration: Windows XP Firefox 3.0.1
I’m starting with VB and I’m having trouble creating VBS scripts that interact with Excel. VBA and VBS syntax are not the same, and when I try to take VBA code and put it into a script I get errors. Is there any help on the differences between VBS and VBA?
I’m a bit lost
Thank you for your help
Configuration: Windows XP Firefox 3.0.1
3 answers
-
ContributorHello
yes indeed, e.g. a msgbox in VBA becomes Wscript.echo in VBS... above all, stay zen!!!
this site might help you
http://www.host-web.com/iishelp/VBScript/htm/VBStoc.htm
Good luck!
--
Michel -
Hello,
Thank you for the information but that's not exactly what I'm looking for. I would like to know the syntax to drive Excel in VBScript.
For example, how can I translate the following VBA: ActiveWindow.DisplayGridlines = False (which hides the gridlines) into VBScript?
Thank you for your help as I'm going in circles !!!! -
Good, I’ve solved my problem:
AppXlS.ActiveWindow.DisplayGridlines = False with
AppXlS = Wscript.CreateObject("Excel.Application")
there you go, it wasn’t complicated after all!
Thanks