Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DHTML / CLASS Runtime Error 91

Status
Not open for further replies.

Rock6431

Programmer
Mar 23, 2002
56
US
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
-------------


 
It may help to know what line you are getting the error on.
 
Sorry... The line it errors on is the Call.

Call mc.GetRampInfo("BD", "NAME")


Mike
 
You're not creating an instance of the class, either

Dim mc as New Class1
or

Dim mc as Class1
set mc = New Class1

Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top