VanDyke Software Forums

VanDyke Software Forums (
-   Scripting (
-   -   Error when declaring the variable type (

hrZN 10-02-2019 04:41 AM

Error when declaring the variable type
Why do I always get an error when I declare the variable type?
For example if I put the following statement in my script I get an error:

Dim B As Boolean

bgagnon 10-02-2019 07:40 AM

Hi hrZN,

I'm not sure how this relates to one of our products, but what error do you get?

What scripting language are you using?

bgagnon 10-02-2019 11:48 AM

Hi hrZN,

It sounds like you are trying to use Visual Basic, not VBScript. SecureCRT supports VBScript, and in that language you do not specify a type (because all variables in VBScript are of type VARIANT).

So instead, you would use:

Dim B

hrZN 10-02-2019 01:38 PM

Thank you Brenda, yes I thought it was Visual Basic, I did not know it is VBScript. That is a very useful information for me.

bgagnon 10-02-2019 02:50 PM

Hi hrZN,

One good resource is our VBScript manual, Scripting Essentials.

All times are GMT -6. The time now is 11:19 AM.