Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default needing help with replace(c.value

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default needing help with replace(c.value

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default needing help with replace(c.value

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default needing help with replace(c.value

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default needing help with replace(c.value

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
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
Needing Help Khanjohn Excel Programming 3 April 21st 07 01:45 PM
Needing Help Very Bad Mike Excel Worksheet Functions 6 July 19th 06 07:23 AM
How can I use replace(alt+H) for mutiple items needing replace Gery Excel Worksheet Functions 1 June 15th 05 05:51 PM
Needing to know how to use a "and" in a formula.... Eric Excel Worksheet Functions 1 November 4th 04 06:47 PM
VBA newb needing help with an IF duster Excel Programming 4 June 27th 04 10:28 PM


All times are GMT +1. The time now is 09:26 AM.

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

About Us

"It's about Microsoft Excel"