06-22-2012, 01:55 PM
Solved it. Again, thanks sshukla12!
Code:
Public frmFlightReservation
Set frmFlightReservation = createDescription("Window", "Flight Reservation", "", "")
Code:
Public Function createDescription(typeObject, valProperty, auxProperty, auxPropertyVal)
'================================================
' Description: Form object instantiation function
'================================================
' Parameters:
' typeObject = MICClass/Class name of the Object
' valProperty = Value of the text/attached text
' auxProperty = Object's other specified optional property (Optional)
' auxPropertyVal = Value of the object's other specified optional property (Optional)
'================================================
' Code START!
Set objInst = Description.Create()
objInst("micclass").Value = typeObject
Select Case typeObject
Case "Window":
objInst("text").Value = valProperty
Case "Dialog":
objInst("text").Value = valProperty
Case "WinComboBox":
objInst("attached text").Value = valProperty
Case "WinButton":
objInst("text").Value = valProperty
Case "WinRadioButton":
objInst("text").Value = valProperty
Case "WinEdit":
objInst("attached text").Value = valProperty
Case "WinList":
objInst("attached text").Value = valProperty
End Select
If auxProperty <> "" And auxPropertyVal <> "" Then
objInst(auxProperty).Value = auxPropertyVal
End If
Set createDescription = objInst
End Function