Click to See Complete Forum and Search --> : Launch Excel


Nanderson
March 19th, 2001, 05:26 PM
I have an Excel file located on a Windows95 share on a peer-to-peer network. I want to be able to open that file from the share so that when I use the following formula in Excel I see the networked path [i.e. "\\COMPUTERNAME\DIR\"]:

=INFO("directory")

So far everything I have tried I get some variation of "C:\My Documents\" even though the "Start-up" folder on the shortcut uses the networked path. I have tried every combination of .BAT files and .LNK files I can think of, but it ALWAYS has a local path.

Does anyone know of a way to launch a file in Excel using a shortcut, and have the above formula display the networked path? Perhaps by using WSH or VB? Or better yet if anyone has an idea that would not require installing software to make it work [The PC this is needed for does not have WSH or VB runtime files].

Any suggestions are appeciated.

Nathan

http://jsprod.odigo.com/share/servlets/OnLineR?userId=2986792&pId=odigo&design=3&tool=signature

TimCottee
March 20th, 2001, 08:21 AM
Nathan, you cannot do this satisfactorily with the Info worksheet function. My suggested method would be to include a VBA module either in a default template or in the workbook you are interested in with the following function.

Function WorkingFolder() as string
WorkingFolder = Application.ActiveWorkbook.Path
End Function



You can then use this to return the path correctly.

Nanderson
March 20th, 2001, 11:56 AM
Okay... well your code works to get the directory including the computername the file is on... EXCEPT... I can't figure out how to have it evaluate it each time I launch the file. Any suggestions?

http://jsprod.odigo.com/share/servlets/OnLineR?userId=2986792&pId=odigo&design=3&tool=signature