|
-
Mar 13th, 2000, 04:41 AM
#1
Thread Starter
Member
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)
-
Mar 13th, 2000, 04:57 AM
#2
Frenzied Member
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
-
Mar 13th, 2000, 04:59 AM
#3
Thread Starter
Member
-
Mar 13th, 2000, 05:16 AM
#4
Frenzied Member
Oops...
I edited my reply after you responded...Check it again (it changed)
~seaweed
-
Mar 15th, 2000, 03:51 AM
#5
Thread Starter
Member
for them sort of problems go to
http://www.geocities.com/CollegePark/Library/3001/vblink.html
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
|