Does VBA programmer need to know VBScript?

Jaymond Flurrie

Well-known Member
Joined
Sep 22, 2008
Messages
921
Office Version
  1. 365
Platform
  1. Windows
I've seen people answering questions by posting some VBScript program. I'm trying to get better and better Excel user, so my question is: Since I already know VBA, is there a reason I should study VBScript as well? What kind of programs I can write with VBScript that are impossible or next to impossible to write with VBA?
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
VBScript is basically a smaller subset of VB than VBA is. If you know VBA, you can pretty much write VBS - you just stop typing your variables, put all the code into a text file with a vbs extension and don't enclose the main code in a procedure declaration. Also, you can't use APIs, or set references.
 
Upvote 0
Hi Mark,
I mean that you cannot set a reference to, say, the Excel library. Everything has to be late bound.
 
Upvote 0
From what I have gathered VB Script is not primarily made for Excel.

It is a scripting tool for administrators.
It can delve deeper into the system than VBA and runs without other programs or compilers as the scripting engine is built into the Windows framework.

It is also pretty popular within dynamic web pages and is pretty much
the same code as ASP, a popular web page scripting language.

Before windows upgraded it's security VBS was a common language for writing viruses as it could get into the system with elevated permissions.

I think Windows stops that now by stopping browser scripts from running on the actual system with high permissions, (sandbox?)

As for Excel itself I would say VBA is the ideal choice as it is built for Excel while VBS will have many limitations if you try to use it like VBA in Excel.

It is easy to learn by the way, same basic structure as VBA, you just need to find enough daily uses for it to use consistently.

2c

Cheers
 
Upvote 0
I'd have to disagree with that. VBA can do anything VBS can do and, by virtue of the WinAPI, much more.
yep your probably right, they do both have the FileSystemObject which allows all sorts of File system access.

Not sure on the rest, I think windows has phased it a web based language these days.

cheers
 
Upvote 0

Forum statistics

Threads
1,224,595
Messages
6,179,798
Members
452,943
Latest member
Newbie4296

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top