Start New Discussion within our Software Development Community

hi every1,
another prob cnt solve even after googling


how can i load a notepad file or txt file on VB,
what i mean is loading the notepad.exe with the file inside


example

i click the cmdLoad

then it will open the file (on notepad)
the file i want to load is a .txt file

and also the file is on the same folder
so after i burn it on a CD it will still read it
(like using the app.path ,i tried it but still error)

here 's the code

Dim dTaskID As Double, path As String, file As String
path = "C:\WINDOWS\notepad.exe" 
file = "C:\fileerror.dat" <---- i tried changing this to (app.path & "\SAMPLE.txt") still error
dTaskID = Shell(path + " " + file, vbNormalFocus)
MsgBox ("Text loaded")

help pls . thx

-------------------------------------------------------------------

figured it out guys
sory for the kinda stupid post, i kinda panic there im on a rush to do this,
:)

here the code and see the little error

Dim dTaskID As Double, path As String, file As String
path = "C:\WINDOWS\notepad.exe"
file = App.path & "\USERMANUAL-CAI\Admin Enable Main Menu.txt"
dTaskID = Shell(path + " " + file, vbNormalFocus)

This question has already been answered. Start a new discussion instead.