Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Starting another program (again) Maybe TOM
Hi
i start where we ended last Is there not a way to have a file name longer than 12 Tom Wrote: Just another thought. After you get lngChars, look at it with msgbox msgbox lngChars if it is longer than 12, then that is your problem. If you created the test file in Notepad, you should type in the 12 characters and then do file save. No Return at the end of the 12 characters. -- Regards, Tom Ogilvy "Tom Ogilvy" wrote in message ... This worked fine for me: Sub mno() On Error GoTo E_Handle Dim strImport As String Dim lngChars As Long Dim intFile As Integer intFile = FreeFile Open "C:\alm.txt" For Input As intFile lngChars = LOF(intFile) strImport = Trim(Input(lngChars, intFile)) Shell ("c:\windows\notepad.exe '" & strImport & "'") E_Handle: Close #intFile End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Starting another program (again) Maybe TOM
12 was specifically the length of "C:\gemme.txt"
the thought was that you might be getting back more than the 12 characters "C:\gemme.txt". You can have a string a long as you want in the file as long as it represents a valid fully qualified path. -- Regards, Tom Ogilvy "Alvin Hansen" wrote in message ... Hi i start where we ended last Is there not a way to have a file name longer than 12 Tom Wrote: Just another thought. After you get lngChars, look at it with msgbox msgbox lngChars if it is longer than 12, then that is your problem. If you created the test file in Notepad, you should type in the 12 characters and then do file save. No Return at the end of the 12 characters. -- Regards, Tom Ogilvy "Tom Ogilvy" wrote in message ... This worked fine for me: Sub mno() On Error GoTo E_Handle Dim strImport As String Dim lngChars As Long Dim intFile As Integer intFile = FreeFile Open "C:\alm.txt" For Input As intFile lngChars = LOF(intFile) strImport = Trim(Input(lngChars, intFile)) Shell ("c:\windows\notepad.exe '" & strImport & "'") E_Handle: Close #intFile End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
excel keeps crashing when starting the program | Excel Discussion (Misc queries) | |||
Starting another program out of Excel VB?? | Excel Worksheet Functions | |||
what are Compile Errors on Starting program? | New Users to Excel | |||
starting another program | Excel Programming | |||
starting an external program with a command line | Excel Programming |