-
I'M TRYING TO OPEN A DAT FILE BUT WHEN I CLICK ON THE FILE, IT SAYS IT NOT FOUND, HELP!!!
CommonDialog1.Filter = "Data Files(*.dat)|*.dat"
CommonDialog1.ShowOpen
Dim loadedfile As String
loadedfile = CommonDialog1.filename
Dim Load As Long
Load = Shell("" & loadedfile, vbNormalFocus)
-
Try this
To open a file, you need to specify the program to open it with...Try this:
Code:
Option Explicit
Private Sub Command1_Click()
Dim Load As Double
Dim LoadedFile As String
CommonDialog1.Filter = "Data Files(*.dat)|*.dat"
CommonDialog1.ShowOpen
LoadedFile = CommonDialog1.FileName
Load = Shell("C:\WINDOWS\Notepad.exe " & LoadedFile, _
vbNormalFocus)
End Sub
Make sure the path to notepad is correct!
Edited by seaweed on 03-13-2000 at 05:14 PM
-
-
Oops...
I edited my reply after you responded...Check it again (it changed)
~seaweed
-
for them sort of problems go to
http://www.geocities.com/CollegePark/Library/3001/vblink.html