Create Object problem

JUDO

Registered User.
Local time
Today, 22:33
Joined
Aug 21, 2003
Messages
26
Please help, the attached code works fine in Windows XP but twhen run on a Windows 2000 pc it fails on the create object, any ideas?

Function GetXmlFilename()
Dim objDialog
GetXmlFilename = ""
Set objDialog = CreateObject("UserAccounts.CommonDialog")
objDialog.Filter = "XML Files|*.xml|All Files|*.*"
objDialog.FilterIndex = 1
objDialog.InitialDir = "C:\temp"
If Not objDialog.ShowOpen Then
Exit Function
End If
GetXmlFilename = objDialog.Filename
End Function

Thanks in advance
 
I would hazard a guess that the object type you are trying to create doesn't exist in Windows 2000, but is in XP. Kind of like the feature in XP that allows you to use Windows Key + L to lock the computer but it doesn't seem to work in Win2000.
 

Users who are viewing this thread

Back
Top Bottom