An example of use Classes in the Rhino V2,V3 VBScript

=======================START of SCRIPT (name it something.rvb)

'Using the class MyClassA
Sub ClassTest()

    Set obj = New MyClassA
 If mycheck = true then
     obj.ClassMsg "OoO I am in here!"
'done with obj empty/release it
  Set obj = Nothing
 End If
End Sub
' assign class only once
Sub ClassAssigned

'check for existence of the object
  MyCheck = IsObject(obj)
'let see do we already have an object or obj is empty
 If MyCheck = False or IsEmpty(obj) then
  msgbox "Obj hasn't been defined"
   msgbox "Obj HAS been defined"
 End If
End Sub

'global declaration of the variables
Dim obj, MyCheck

'******separate this if we want to run it more than once (see below) but
'for testing purpose to see how class has been implemented this is fine
Class MyClassA
Sub ClassMsg(msg)'Method classmsg
    MsgBox msg
End Sub
End Class
'*****end separate

=====================END of SCRIPT|
Note the above script will run only once so we have to do the following to run this multiple times:

'******separate this
Class MyClassA
'Method classmsg
Sub ClassMsg(msg)
    MsgBox msg
End Sub
End Class
'*****end separate

from the list above and save it as a separate script file let say initclass.rvb

Start Rhino->Tools->Options->RhinoScript->StartUp File Settings->StartUpFile

|============| this portion may be different on your computer

This will load class MyClassA (only once) at Rhino's startup so we can use and reuse them later

LoadScript and select something.rvb