By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,479 Members | 1,548 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,479 IT Pros & Developers. It's quick & easy.

Variables in Shell Command

P: n/a
I have this shell command:

Call Shell("""" & ShellPath & """""NETWORK AND FILENAME""""""")

and also:

Debug.print ("""" & ShellPath & """""NETWORK AND FILENAME""""""")

(They are identical).

when I add Call Shell to the beginning of the debug window output, it
works. However, the code doesn't work from VBA.

Feb 14 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Can you post the results of the Debug.Print. I think that
will be more helpful to find the issue.

It seems like you have too many quotes, and too few spaces.
--

Danny J. Lesandrini
dl*********@hotmail.com
http://amazecreations.com/datafast
<mi********@gmail.com> wrote...
I have this shell command:

Call Shell("""" & ShellPath & """""NETWORK AND FILENAME""""""")

and also:

Debug.print ("""" & ShellPath & """""NETWORK AND FILENAME""""""")

(They are identical).

when I add Call Shell to the beginning of the debug window output, it
works. However, the code doesn't work from VBA.

Feb 14 '06 #2

P: n/a
This shows in the debug window. When I add 'Call Shell' to the front,
it works:

"C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE ""NETWORK AND
FILE NAME""""

I should add that Access is launching when I run it from VBA, but not
the file. When I run it from the debug window, both launch OK.

Feb 14 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.