Re: VBS Class error...

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



A. Nonymous wrote:
Could someone please tell me what is wrong with this code?

Class Test
Private Const BUFFER_SIZE = 100
End Class

TIA...

Unfortunately declaring class level constants in VBScript classes outside
sub/functions is not supported (aka a known bug that will never get fixed).
The best you can do is an ordinary private class level variable initialized
via Class_Initialize.

--
Michael Harris
Microsoft.MVP.Scripting


.