Public Type -- Getting error
in module1.bas I have the following (from help) that I made public.
Public Type EmployeeRecord ' Create user-defined type.
ID As Integer ' Define elements of data type.
Name As String * 20
Address As String * 30
Phone As Long
HireDate As Date
End Type
-------------------------------
From form1 I have the following (from help)
Sub CreateRecord()
Dim MyRecord As EmployeeRecord ' Declare variable.
' Assignment to EmployeeRecord variable must occur in a procedure.
MyRecord.ID = 12003 ' Assign a value to an element.
End Sub
---------------------------------
When I call CreateRecord within form load, I get a error
user-defined type not defined (at Dim MyRecord As EmployeeRecord ' Declare
variable)
If everything is in form1, it works. What am I doing wrong?
Gary...