View Single Post
  #1 (permalink)  
Old November 16th, 2011, 03:29 PM
SunnySide SunnySide is offline
Authorized User
Points: 102, Level: 2
Points: 102, Level: 2 Points: 102, Level: 2 Points: 102, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2011
Posts: 24
Thanks: 1
Thanked 0 Times in 0 Posts
Default How to keep a path unbroken in VBA?

I have the Code:
Dim stAppName As String

stAppName = ("C:\Program Files\Microsoft Office\Office12\EXCEL") & " " & "\\Directory\Finance\filename\Database" & " " & "Tools\Drop" & " " & "Ship\Dropship_Payments_Import.xls'"
Call Shell(stAppName, 1)

Cmd on a button in an Access Form. It brings you to the excel program just fine, but it can't find the file, due to the path being broken at the spaces. The company is large and the folder names can not be changed. What's the best way to ignore spaces in a path. The error says it can't find the file, which is split by the spaces in folder names.

suggestions?
Reply With Quote