shell

  • Thread starter Thread starter seeker
  • Start date Start date
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.
 
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.
 
Back
Top