shell

S

seeker

I posted this in wrong place sorry.

Shell "c:\program files\Microsoft office\office11\excel.exe
\\btcserver1\company shared folders\socialstats\monthlysocialstats.xls",
vbMaximizedFocus

opens excel just fine but does not open the path. chokes on spaces between
company shared folders. Thanks.
 
D

Daniel Pineault

Unless you specifically need to use SHELL, why not use
Application.FollowHyperlink method instead. It is easier to work with and
determines the apprpriate app to launch instead of you hoping the the exe you
need is where you believe it should be.

Try:
Application.FollowHyperlink "\btcserver1\company shared
folders\socialstats\monthlysocialstats.xls"

If you have to use the Shell, the try:
Shell("excel.exe " & """" & "\btcserver1\company shared
folders\socialstats\monthlysocialstats.xls" & """", vbMaximizedFocus)

As you can see, you shouldn't need to give the full path to excel. This
will avoid issues if ever you client did not install office in the default
install location.
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.
 
S

seeker

works. thanks. could not remember the application procedure. did not need
to use shell.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

shell 1
Open file, use relative paths 2
Using Shell to open Excel file 1
Fix my shell 2
Please Help!? Shell Command 10
shell command 2
shell to run another mdb 4
Problem with Call Shell 10

Top