Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Path string has spaces

This code does NOT work for me:

v = Shell("C:\bin\wordpad.exe c:\files\Jan 2021\dat\readme.rtf")

The error message says "Unable to open c:\files\Jan"

I guess the space character after "Jan" is what causes the problem. Does anyone have any suggestions on how to fix this without renaming the folders?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default Path string has spaces

"Tatsujin" wrote in message
This code does NOT work for me:

v = Shell("C:\bin\wordpad.exe c:\files\Jan 2021\dat\readme.rtf")

The error message says "Unable to open c:\files\Jan"

I guess the space character after "Jan" is what causes the problem. Does
anyone have any suggestions on how to fix this without renaming the
folders?


Try surrounding the path with double quotes -

v = Shell("C:\bin\wordpad.exe ""c:\files\Jan 2021\dat\readme.rtf""")

Peter T


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Path string has spaces

On Wednesday, January 6, 2021 at 2:37:47 AM UTC-7, Peter T wrote:

Try surrounding the path with double quotes -
v = Shell("C:\bin\wordpad.exe ""c:\files\Jan 2021\dat\readme.rtf""")
Peter T


Yes, that worked. Thanks you!
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
Find String in another string - only between spaces Nir Excel Worksheet Functions 9 November 2nd 06 11:31 AM
Value between two spaces in a String [email protected] Excel Programming 5 September 29th 06 06:52 PM
Removing Spaces from string katmando Excel Worksheet Functions 4 May 16th 06 02:16 PM
Open File with Spaces in Path J Excel Programming 5 November 2nd 04 02:52 PM
counting spaces in a string xnman Excel Programming 4 December 16th 03 01:36 AM


All times are GMT +1. The time now is 06:54 PM.

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"