Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 209
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
excel keeps crashing when starting the program jblake48 Excel Discussion (Misc queries) 1 October 11th 06 05:19 PM
Starting another program out of Excel VB?? Mac Lingo Excel Worksheet Functions 1 June 16th 06 03:52 AM
what are Compile Errors on Starting program? qs1 New Users to Excel 1 June 9th 06 04:22 PM
starting another program Alvin Hansen[_2_] Excel Programming 16 October 2nd 05 08:46 PM
starting an external program with a command line Jonathan[_5_] Excel Programming 0 September 5th 03 02:20 PM


All times are GMT +1. The time now is 06:04 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"