Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello all,
I want to execute following dos command in my XL VB macro. dir C:\Project\Test_Cases /s C:\TEMP_TEST_CASE_ROOT_XXX\files.txt If C:\Project\Test_Cases will be in a variable FName then the following command is perfectly working fine for me. x = Shell("cmd.exe /c dir " & FName & " /s C:\TEMP_TEST_CASE_ROOT_XXX\files. txt", vbHide) The problem comes if my FName has a space in it. For example, if FName is C:\ Project\Test Cases then the above command is not working. How to append " symbol as prefix and suffix to my variable FName. Any help please ??? Sri -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200811/1 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
FName = """c:\ the path"""
or FName = chr(34) & "c:\ the path" & chr(34) Regards, Peter T "Sri via OfficeKB.com" <u47062@uwe wrote in message news:8d0950ab3f660@uwe... Hello all, I want to execute following dos command in my XL VB macro. dir C:\Project\Test_Cases /s C:\TEMP_TEST_CASE_ROOT_XXX\files.txt If C:\Project\Test_Cases will be in a variable FName then the following command is perfectly working fine for me. x = Shell("cmd.exe /c dir " & FName & " /s C:\TEMP_TEST_CASE_ROOT_XXX\files. txt", vbHide) The problem comes if my FName has a space in it. For example, if FName is C:\ Project\Test Cases then the above command is not working. How to append " symbol as prefix and suffix to my variable FName. Any help please ??? Sri -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200811/1 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you very much Peter. It works fine for me...
Sri Peter T wrote: FName = """c:\ the path""" or FName = chr(34) & "c:\ the path" & chr(34) Regards, Peter T Hello all, [quoted text clipped - 17 lines] Sri -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200811/1 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
Read ".dll" files, the Macro "work flow" and the actual values of the variables when Macro is running | Excel Programming | |||
Macro to concatenate into "B1" B2 thru B"x" based on new data in "Col A" | Excel Discussion (Misc queries) | |||
Sending macro based e-mail with built-in "Heading" and "Text" | Excel Programming | |||
Invoking "#REF!" without hardcoding it | Excel Programming |