-
Apr 10th, 2012, 04:50 AM
#1
Thread Starter
New Member
vb6 - User-defined type not defined
HI,
I am trying to modify a pre-written program by others. I copy the original form frmMain to frmMain2.
But when I compile this code for frmMain2 that I copied, I got error message user-defined type undefined. the code is as follow:
//form
Private Sub Form_Load()
....
LoadAlarms mAlarmCollection
.....
End Sub
//XMLStorage Module
Public Sub LoadAlarms(ByRef AlarmCol As Collection)
Dim xmlDoc As DOMDocument <---the error here
Dim i As Long
Dim nodeAlarms As IXMLDOMElement
Dim nodeAlarm As IXMLDOMElement
Dim oAlarm As clsAlarmSetting
Set AlarmCol = New Collection
......
End Sub
It works fine with original frmMain, but does not work with frmMain2.
When I debug, frmMain does not go to DIm xmlDoc, but go stratight to SetAlarm = New Collection.
But when i debuf frmMain2, it goes to Dim xmldoc and error occurs.
Is there anything that i missed out? how do i define DOMDocument?
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|