| | |
Open a text file in notepad
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jun 2007
Posts: 2
Reputation:
Solved Threads: 0
Hi all, I'm building a simple logging program in VB5. I'm entirely self-taught using a couple books and the help files, so if I'm missing something obvious, that's probably why.
Anyway, I'm trying to get my program to be able to open old logs in notepad. I can't seem to to figure out how to do this. I've tried the Shell function, but that just opens notepad. When I try to specify my file instead of the program it gives me an error (Invalid procedure call or argument) which doesn't really surprise me.
I'm assuming I need to open notepad, and then tell it to open the file, I just don't know how and can't seem to figure it out..
Thanks!
Anyway, I'm trying to get my program to be able to open old logs in notepad. I can't seem to to figure out how to do this. I've tried the Shell function, but that just opens notepad. When I try to specify my file instead of the program it gives me an error (Invalid procedure call or argument) which doesn't really surprise me.
I'm assuming I need to open notepad, and then tell it to open the file, I just don't know how and can't seem to figure it out..
Thanks!
•
•
•
•
Thanks! It worked. As soon as I saw it, I knew what I was missing. Now I have to see if I can replace notepad with the system defined text editor. Don't tell me how yet though, I want to ry to solve it on my own. It's amazing what I can learn by accident...
Glad to hear it worked.
A little tip if I may (don't look if you don't want to) ....
Without using Shell command use the windows run command to test the line you are going to use e.g Notepad file.txt. If that works Shell will work most times. There are other fiddles I know if you get stuck.
Denis
![]() |
Similar Threads
- text file strings help (Visual Basic 4 / 5 / 6)
- Open a text file from another project (VB.NET)
- read from database and writing the contents into a text file (C)
- Help Reading Info in Text File Into an Array (C++)
- How to send text to a text file using j2me through http connection? (Java)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Save/Load Picture on DB
- Next Thread: Help me with DtPicker Control
Views: 5252 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for Visual Basic 4 / 5 / 6
* 6 429 2007 access activex add age append application basic beginner birth bmp c++ calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver struct subroutine table tags textbox time timer urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





