Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am new to excel programing but have been using it to instigate commands and
scripts to multiple workstations in a corporate enviroment. basicly my latest macro involves opening the root directory on various workstations in explorer. but MSVBS will not let me introduce "\c$" at the end it forces "\ c$" is there some sort of escape caracter in vb that will alow this? **************** retval = Shell("c:\Windows\explorer.exe \\" & Replace(c.Value, "connected ", "" \c$), vbMaximizedFocus) **************** |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
There are a number of problems with the strings and the quotes. Try
RetVal = Shell("c:\Windows\explorer.exe \\" & _ Replace(C.Value, "connected ", "") & " \c$", vbMaximizedFocus) -- Cordially, Chip Pearson Microsoft Most Valuable Professional Excel Product Group, 1998 - 2008 Pearson Software Consulting, LLC www.cpearson.com (email on web site) "PhrozenRoad" wrote in message ... I am new to excel programing but have been using it to instigate commands and scripts to multiple workstations in a corporate enviroment. basicly my latest macro involves opening the root directory on various workstations in explorer. but MSVBS will not let me introduce "\c$" at the end it forces "\ c$" is there some sort of escape caracter in vb that will alow this? **************** retval = Shell("c:\Windows\explorer.exe \\" & Replace(c.Value, "connected ", "" \c$), vbMaximizedFocus) **************** |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
that worked perfectly
i was just starting to take a step back and wonder if something like that would work. Thank you for your insight. "Chip Pearson" wrote: There are a number of problems with the strings and the quotes. Try RetVal = Shell("c:\Windows\explorer.exe \\" & _ Replace(C.Value, "connected ", "") & " \c$", vbMaximizedFocus) -- Cordially, Chip Pearson Microsoft Most Valuable Professional Excel Product Group, 1998 - 2008 Pearson Software Consulting, LLC www.cpearson.com (email on web site) "PhrozenRoad" wrote in message ... I am new to excel programing but have been using it to instigate commands and scripts to multiple workstations in a corporate enviroment. basicly my latest macro involves opening the root directory on various workstations in explorer. but MSVBS will not let me introduce "\c$" at the end it forces "\ c$" is there some sort of escape caracter in vb that will alow this? **************** retval = Shell("c:\Windows\explorer.exe \\" & Replace(c.Value, "connected ", "" \c$), vbMaximizedFocus) **************** |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I think I misread what you were trying to accomplish. Try instead the
following code: RetVal = Shell("c:\Windows\explorer.exe \\" & _ Replace(C.Value, "connected ", " \c$"), vbMaximizedFocus) -- Cordially, Chip Pearson Microsoft Most Valuable Professional Excel Product Group, 1998 - 2008 Pearson Software Consulting, LLC www.cpearson.com (email on web site) "Chip Pearson" wrote in message ... There are a number of problems with the strings and the quotes. Try RetVal = Shell("c:\Windows\explorer.exe \\" & _ Replace(C.Value, "connected ", "") & " \c$", vbMaximizedFocus) -- Cordially, Chip Pearson Microsoft Most Valuable Professional Excel Product Group, 1998 - 2008 Pearson Software Consulting, LLC www.cpearson.com (email on web site) "PhrozenRoad" wrote in message ... I am new to excel programing but have been using it to instigate commands and scripts to multiple workstations in a corporate enviroment. basicly my latest macro involves opening the root directory on various workstations in explorer. but MSVBS will not let me introduce "\c$" at the end it forces "\ c$" is there some sort of escape caracter in vb that will alow this? **************** retval = Shell("c:\Windows\explorer.exe \\" & Replace(c.Value, "connected ", "" \c$), vbMaximizedFocus) **************** |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
No that actually worked its such a simple thing i was needing, I just didn't
have the background in prog to understand the arguments as most people would "Chip Pearson" wrote: I think I misread what you were trying to accomplish. Try instead the following code: RetVal = Shell("c:\Windows\explorer.exe \\" & _ Replace(C.Value, "connected ", " \c$"), vbMaximizedFocus) -- Cordially, Chip Pearson Microsoft Most Valuable Professional Excel Product Group, 1998 - 2008 Pearson Software Consulting, LLC www.cpearson.com (email on web site) "Chip Pearson" wrote in message ... There are a number of problems with the strings and the quotes. Try RetVal = Shell("c:\Windows\explorer.exe \\" & _ Replace(C.Value, "connected ", "") & " \c$", vbMaximizedFocus) -- Cordially, Chip Pearson Microsoft Most Valuable Professional Excel Product Group, 1998 - 2008 Pearson Software Consulting, LLC www.cpearson.com (email on web site) "PhrozenRoad" wrote in message ... I am new to excel programing but have been using it to instigate commands and scripts to multiple workstations in a corporate enviroment. basicly my latest macro involves opening the root directory on various workstations in explorer. but MSVBS will not let me introduce "\c$" at the end it forces "\ c$" is there some sort of escape caracter in vb that will alow this? **************** retval = Shell("c:\Windows\explorer.exe \\" & Replace(c.Value, "connected ", "" \c$), vbMaximizedFocus) **************** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Needing Help | Excel Programming | |||
Needing Help Very Bad | Excel Worksheet Functions | |||
How can I use replace(alt+H) for mutiple items needing replace | Excel Worksheet Functions | |||
Needing to know how to use a "and" in a formula.... | Excel Worksheet Functions | |||
VBA newb needing help with an IF | Excel Programming |