Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > microsoft.public.scripting.vbscript > #11919 > unrolled thread
| Started by | gerald.bell@pnmac.com |
|---|---|
| First post | 2018-04-27 06:46 -0700 |
| Last post | 2018-05-30 20:11 +0200 |
| Articles | 7 — 4 participants |
Back to article view | Back to microsoft.public.scripting.vbscript
convert VBS line to VBA gerald.bell@pnmac.com - 2018-04-27 06:46 -0700
Re: convert VBS line to VBA gerald.bell@pnmac.com - 2018-04-27 06:48 -0700
Re: convert VBS line to VBA gerald.bell@pnmac.com - 2018-04-27 07:14 -0700
Re: convert VBS line to VBA "Auric__" <not.my.real@email.address> - 2018-04-27 14:43 +0000
Re: convert VBS line to VBA JJ <jj4public@vfemail.net> - 2018-04-28 03:01 +0700
Re: convert VBS line to VBA gerald.bell@pnmac.com - 2018-05-02 07:18 -0700
Re: convert VBS line to VBA "Wendelin Uez" <wuez@online.de> - 2018-05-30 20:11 +0200
| From | gerald.bell@pnmac.com |
|---|---|
| Date | 2018-04-27 06:46 -0700 |
| Subject | convert VBS line to VBA |
| Message-ID | <f79911ca-ebad-4aa7-a321-926fa0ca333f@googlegroups.com> |
Hi. I have the following in VBS: \\site.com\srvr\Applications\SUB2\SUB3\FLDR\SysWOW64\wscript.exe N:\TEST\TEST.vbs I thought these 2 lines in VBA would do the same thing, but I am getting error: ChDir "\\site.com\srvr\Applications\SUB2\SUB3\FLDR\FLDR2\FLDR3\Bin" Shell "wscript ""N:\TEST\TEST.vbs"" How can I convert that VBS code to Excel VBA? Thanks
[toc] | [next] | [standalone]
| From | gerald.bell@pnmac.com |
|---|---|
| Date | 2018-04-27 06:48 -0700 |
| Message-ID | <f7af4e0d-6fd2-4d7d-a777-7be1e29cd022@googlegroups.com> |
| In reply to | #11919 |
On Friday, April 27, 2018 at 8:46:39 AM UTC-5, geral...@pnmac.com wrote: > Hi. > > I have the following in VBS: > \\site.com\srvr\Applications\SUB2\SUB3\FLDR\SysWOW64\wscript.exe N:\TEST\TEST.vbs > > > I thought these 2 lines in VBA would do the same thing, but I am getting error: > > ChDir "\\site.com\srvr\Applications\SUB2\SUB3\FLDR\FLDR2\FLDR3\Bin" > > Shell "wscript ""N:\TEST\TEST.vbs"" > > > How can I convert that VBS code to Excel VBA? > > Thanks hi. actually, that is a .BAT line, not VBS. how can I convert that .BAT line to excel VBA?
[toc] | [prev] | [next] | [standalone]
| From | gerald.bell@pnmac.com |
|---|---|
| Date | 2018-04-27 07:14 -0700 |
| Message-ID | <89ac7efb-c3a9-49c3-bb4b-1df07b465e3f@googlegroups.com> |
| In reply to | #11919 |
On Friday, April 27, 2018 at 8:46:39 AM UTC-5, geral...@pnmac.com wrote: > Hi. > > I have the following in VBS: > \\site.com\srvr\Applications\SUB2\SUB3\FLDR\SysWOW64\wscript.exe N:\TEST\TEST.vbs > > > I thought these 2 lines in VBA would do the same thing, but I am getting error: > > ChDir "\\site.com\srvr\Applications\SUB2\SUB3\FLDR\FLDR2\FLDR3\Bin" > > Shell "wscript ""N:\TEST\TEST.vbs"" > > > How can I convert that VBS code to Excel VBA? > > Thanks nevermind. figured it out.
[toc] | [prev] | [next] | [standalone]
| From | "Auric__" <not.my.real@email.address> |
|---|---|
| Date | 2018-04-27 14:43 +0000 |
| Message-ID | <XnsA8D14E958E37auricauricauricauric@85.214.115.223> |
| In reply to | #11919 |
gerald.bell wrote: > I have the following in VBS: > \\site.com\srvr\Applications\SUB2\SUB3\FLDR\SysWOW64\wscript.exe > N:\TEST\TEST.vbs > > > I thought these 2 lines in VBA would do the same thing, but I am getting > error: > > ChDir "\\site.com\srvr\Applications\SUB2\SUB3\FLDR\FLDR2\FLDR3\Bin" > > Shell "wscript ""N:\TEST\TEST.vbs"" > > > How can I convert that VBS code to Excel VBA? I've got to wonder, why is your batch calling wscript from a server? Is there a policy preventing you from running the local copy? -- los flores pequeno de muerte (the little flowers of death)
[toc] | [prev] | [next] | [standalone]
| From | JJ <jj4public@vfemail.net> |
|---|---|
| Date | 2018-04-28 03:01 +0700 |
| Message-ID | <draodu1acabj.1hynsdru5fjmv$.dlg@40tude.net> |
| In reply to | #11922 |
On Fri, 27 Apr 2018 14:43:32 -0000 (UTC), Auric__ wrote: > gerald.bell wrote: > >> I have the following in VBS: >> \\site.com\srvr\Applications\SUB2\SUB3\FLDR\SysWOW64\wscript.exe >> N:\TEST\TEST.vbs >> >> >> I thought these 2 lines in VBA would do the same thing, but I am getting >> error: >> >> ChDir "\\site.com\srvr\Applications\SUB2\SUB3\FLDR\FLDR2\FLDR3\Bin" >> >> Shell "wscript ""N:\TEST\TEST.vbs"" >> >> >> How can I convert that VBS code to Excel VBA? > > I've got to wonder, why is your batch calling wscript from a server? Is there > a policy preventing you from running the local copy? What he asked, never agree with what his code does.
[toc] | [prev] | [next] | [standalone]
| From | gerald.bell@pnmac.com |
|---|---|
| Date | 2018-05-02 07:18 -0700 |
| Message-ID | <8537b56e-677e-40d8-83d4-ee47df9ae04b@googlegroups.com> |
| In reply to | #11919 |
On Friday, April 27, 2018 at 8:46:39 AM UTC-5, geral...@pnmac.com wrote: > Hi. > > I have the following in VBS: > \\site.com\srvr\Applications\SUB2\SUB3\FLDR\SysWOW64\wscript.exe N:\TEST\TEST.vbs > > > I thought these 2 lines in VBA would do the same thing, but I am getting error: > > ChDir "\\site.com\srvr\Applications\SUB2\SUB3\FLDR\FLDR2\FLDR3\Bin" > > Shell "wscript ""N:\TEST\TEST.vbs"" > > > How can I convert that VBS code to Excel VBA? > > Thanks hi. its only because i am trying to let other people run the code from their machine. and the software i have on my machine is not on theirs. but there are DLL files i places on the LAN.
[toc] | [prev] | [next] | [standalone]
| From | "Wendelin Uez" <wuez@online.de> |
|---|---|
| Date | 2018-05-30 20:11 +0200 |
| Message-ID | <pempl5$f1g$1@news.albasani.net> |
| In reply to | #11919 |
Hi Gerald,
simply create a .bat file RUNTEST.bat in N:\TEST with one single command
\\site.com\srvr\Applications\SUB2\SUB3\FLDR\SysWOW64\wscript.exe
N:\TEST\TEST.vbs
and excute this .bat file in a VBA script with
CALL SHELL ("N:\TEST\RUNTEST.bat",1)
or eventually shorter with SHELL "N:\TEST\RUNTEST.bat",1 what should also
work (maybe this syntax requires a semicolon instead of a comma).
HTH,
wuez
[toc] | [prev] | [standalone]
Back to top | Article view | microsoft.public.scripting.vbscript
csiph-web