Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

CATScriptError

Status
Not open for further replies.

kuleszajmk

Automotive
Joined
Nov 7, 2010
Messages
29
Location
US
Microsoft VBScript complilation error
Description: Expected end of statement
Statement: Dim ProductDoc1 As Document

Here is the macro:
Sub CATMain()
Dim ProductDoc1 As Document
End Sub

Any help would be great!
Thanks,
Jim
 
VBScript is a late-bound language, you cannot dim as type. Comment out or remove "as document".
 
Really? No declaring of variables?
Not sure about "late-bound" means.
So I can not use macros that declare variables?
Thank You
Jim K
 
You can but you have to comment out "as type". You also cannot use GoTo, other than "on error GoTo net" and "on error GoTo 0". There is also no collection class, so you cannot create your own collections. Late-bound means the compiler discovers variable type on-the-fly, early bound know them ahead of time...see Remember VBScript is a simplified version of VBA.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top