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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I can't get "*.xml" to work with Dir()

Status
Not open for further replies.

steve728

Programmer
Mar 16, 2003
536
US
The following works fine:

strFile = "form2.xml"
If Dir("E:\Steve\" & strFile) = strFile Then
Me.Cmd4.Enabled = True
Else
Me.Cmd4.Enabled = False
End If

I want to use strFile = "*.xml" instead. What do I need to change in my coding? Any advise would be appreciated.

Steve728
 
strFile = "*.xml"
If Dir("E:\Steve\" & strFile) <> "" Then
Me.Cmd4.Enabled = True
Else
Me.Cmd4.Enabled = False
End If

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top