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)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.