CodeLover
CodeLover

Reputation: 1074

VbScript error when declaring any variable with its required data types

In my .VBS file, whenever using any such declaration, I am getting error.Why so,any ideae?

Option Explicit

Dim vString as String

Error is : "Expected end of Statement"

I could not declare any variable with its required data types.

Upvotes: 1

Views: 1285

Answers (1)

Fred
Fred

Reputation: 5808

In VBScript there is only variants so it would be Dim vString (remove the As String)

Upvotes: 3

Related Questions