I have the following code in an DHTML form and a class module behind it. When I try to execute the class module I keep getting Runtime Error 91 Object Variable or With Block Not Set?
What did I forget?
TIA
Mike
Class Module (Class1) is Shown Below:
---------
Private mstrCustName As String
Public Property Get CustName() As String
CustName = mstrCustName
End Property
Public Property Let CustName(ByVal strCustName As String)
mstrCustName = strCustName
End Property
Public Function GetRampInfo(strScreen As String, strwhat As String)
' USE: GetRampInfo("BD","Screen"
' strScreen constanants are the applicable RAMP Screen Name/Abbreviations
' strWhat constanants are the following:
' Name, Add, Add1, Add2, City, State, Zip, Cus (cust code), II,
' Screen, Bal (balance), AS (account status), ABC/LBC (bill cycle date),
' Bdate (bill date), Line5, CI (cust info), Pay(payment due date)
' Need to verify what screen Ramp is on then move to the appropriate screen if needed
' Once on Proper Screen Get Applicable information and return it.
If strScreen = "BD" Then
' BILL DISPLAY Selected
' Begin Executing Commands for the BD Screen:
If strwhat = "Name" Then
CustName = "MIKE"
End If
End If
End Function
------------
DHTML Page Info is shown below:
------------
Private Function Button1_onclick() As Boolean
' Fill Fields
Dim mc As Class1
Dim ms As String
Call mc.GetRampInfo("BD", "NAME"
ms = GetRampInfo.CustName
TextField1.Value = ms
End Function
-------------
What did I forget?
TIA
Mike
Class Module (Class1) is Shown Below:
---------
Private mstrCustName As String
Public Property Get CustName() As String
CustName = mstrCustName
End Property
Public Property Let CustName(ByVal strCustName As String)
mstrCustName = strCustName
End Property
Public Function GetRampInfo(strScreen As String, strwhat As String)
' USE: GetRampInfo("BD","Screen"
' strScreen constanants are the applicable RAMP Screen Name/Abbreviations
' strWhat constanants are the following:
' Name, Add, Add1, Add2, City, State, Zip, Cus (cust code), II,
' Screen, Bal (balance), AS (account status), ABC/LBC (bill cycle date),
' Bdate (bill date), Line5, CI (cust info), Pay(payment due date)
' Need to verify what screen Ramp is on then move to the appropriate screen if needed
' Once on Proper Screen Get Applicable information and return it.
If strScreen = "BD" Then
' BILL DISPLAY Selected
' Begin Executing Commands for the BD Screen:
If strwhat = "Name" Then
CustName = "MIKE"
End If
End If
End Function
------------
DHTML Page Info is shown below:
------------
Private Function Button1_onclick() As Boolean
' Fill Fields
Dim mc As Class1
Dim ms As String
Call mc.GetRampInfo("BD", "NAME"
ms = GetRampInfo.CustName
TextField1.Value = ms
End Function
-------------