Can't find the exact "Path". I'm close but not quite.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi and thanks, I'm trying to start an Excel program called "MayInventory" (no Spaces) from an Access form. This should be easy but I'm missing something. I have tried a command button with the wizzard, and I've tried a macro using "RunApp" with the same results. The closest I got was a New Excel Spreadsheet opened with a message saying to check the path"Cannot find fille. I have Access 2000 and Windows 98. The paths I tried are
C:\My Documents\MayInventor
C:\My Documents\MayInventory.xl
Excel.exe C:\My Documents\MayInventor
Excel.exe C:\My Documents\MayInventory.xl
and all the above with no space in MyDocuments. I also tried adding on the name of the worksheet that I would like it to open with at the end and none of them work. The one that opened Excel with the "Cannot find file" Message is the 3rd or 4th one. Is there a Prefix or something I need?. I have searched the office assistant and still can't get it
Thank
Glen K
 
Use the follwing code behind your buttion:


application.FollowHyperlink "C:\My Documents\MayInventory.xls"
 
Hi Albert and thanks
I am getting a "Compile error / Syntax error" now. I triple checked my typing
Tried with button and tried with Run app and same trouble
Thank
Glen

----- Albert D. Kallal wrote: ----

Use the follwing code behind your buttion


application.FollowHyperlink "C:\My Documents\MayInventory.xls


-
Albert D. Kallal (MVP
Edmonton, Alberta Canad
(e-mail address removed)
http://www.attcanada.net/~kallal.ms
 
I'd suggest something like C:\Documents and
Settings\YourUserName\Mydocuments\MayInventory.xls

Glen K said:
Hi and thanks, I'm trying to start an Excel program called "MayInventory"
(no Spaces) from an Access form. This should be easy but I'm missing
something. I have tried a command button with the wizzard, and I've tried a
macro using "RunApp" with the same results. The closest I got was a New
Excel Spreadsheet opened with a message saying to check the path"Cannot find
fille. I have Access 2000 and Windows 98. The paths I tried are:
C:\My Documents\MayInventory
C:\My Documents\MayInventory.xls
Excel.exe C:\My Documents\MayInventory
Excel.exe C:\My Documents\MayInventory.xls
and all the above with no space in MyDocuments. I also tried adding on the
name of the worksheet that I would like it to open with at the end and none
of them work. The one that opened Excel with the "Cannot find file" Message
is the 3rd or 4th one. Is there a Prefix or something I need?. I have
searched the office assistant and still can't get it.
 
Thanks Mike but no go. I believe that path type is required for Windows 2000 and newer. All I got so far is that "Excel.exe" will open a New Excel Spreadsheet. Thats close, now I need to know how to specify a my specific File
Thanks Agai
Glen

----- Mike Painter wrote: ----

I'd suggest something like C:\Documents an
Settings\YourUserName\Mydocuments\MayInventory.xl

Glen K said:
Hi and thanks, I'm trying to start an Excel program called "MayInventory
(no Spaces) from an Access form. This should be easy but I'm missin
something. I have tried a command button with the wizzard, and I've tried
macro using "RunApp" with the same results. The closest I got was a Ne
Excel Spreadsheet opened with a message saying to check the path"Cannot fin
fille. I have Access 2000 and Windows 98. The paths I tried are
C:\My Documents\MayInventor
C:\My Documents\MayInventory.xl
Excel.exe C:\My Documents\MayInventor
Excel.exe C:\My Documents\MayInventory.xl
and all the above with no space in MyDocuments. I also tried adding on th
name of the worksheet that I would like it to open with at the end and non
of them work. The one that opened Excel with the "Cannot find file" Messag
is the 3rd or 4th one. Is there a Prefix or something I need?. I hav
searched the office assistant and still can't get it
 
You are sure you got the path name correct?

The code behind the button looks like:

Private Sub Command41_Click()

Application.FollowHyperlink "c:\my documents\visa.xls"


End Sub


I just tried the above...and it worked fine.

Try moving a document to right to the root of drive c, and then use:



Application.FollowHyperlink "c:\MayInventory.xls"

However, first try compiling your code before you run it...
 
Yes thats what it is. What I can't figure out is when I add a command button to my form to "Run App" and I follow the wizzards instructions, I browse for the file I want and the Path is C:\My Documents\MayInventory.xls and yet it won't work
Thank
Glen K
----- Albert D. Kallal wrote: ----

You are sure you got the path name correct

The code behind the button looks like

Private Sub Command41_Click(

Application.FollowHyperlink "c:\my documents\visa.xls


End Su


I just tried the above...and it worked fine

Try moving a document to right to the root of drive c, and then use



Application.FollowHyperlink "c:\MayInventory.xls

However, first try compiling your code before you run it..


-
Albert D. Kallal (MVP
Edmonton, Alberta Canad
(e-mail address removed)
http://www.attcanada.net/~kallal.ms
 
I figured it out. I knew it was something simple. Excel.exe MayInventory.xls Thats it. No "C:\My Documents" just Excel.exe MayInventory.xl
Thank anyway. Just happy to moving forwards
Glen

----- Glen K wrote: ----

Thanks Mike but no go. I believe that path type is required for Windows 2000 and newer. All I got so far is that "Excel.exe" will open a New Excel Spreadsheet. Thats close, now I need to know how to specify a my specific File
Thanks Agai
Glen

----- Mike Painter wrote: ----

I'd suggest something like C:\Documents an
Settings\YourUserName\Mydocuments\MayInventory.xl

Glen K said:
Hi and thanks, I'm trying to start an Excel program called "MayInventory
(no Spaces) from an Access form. This should be easy but I'm missin
something. I have tried a command button with the wizzard, and I've tried
macro using "RunApp" with the same results. The closest I got was a Ne
Excel Spreadsheet opened with a message saying to check the path"Cannot fin
fille. I have Access 2000 and Windows 98. The paths I tried are
C:\My Documents\MayInventor
C:\My Documents\MayInventory.xl
Excel.exe C:\My Documents\MayInventor
Excel.exe C:\My Documents\MayInventory.xl
and all the above with no space in MyDocuments. I also tried adding on th
name of the worksheet that I would like it to open with at the end and non
of them work. The one that opened Excel with the "Cannot find file" Messag
is the 3rd or 4th one. Is there a Prefix or something I need?. I hav
searched the office assistant and still can't get it
 
Back
Top