View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas[_4_] Gary Keramidas[_4_] is offline
external usenet poster
 
Posts: 226
Default Opening Files on other User's Desktops

use environ("userprofile") to determine the location.

in the vb editor. do a control g to enable the immediate window

paste the following and hit enter

?Environ("UserProfile") & "\Desktop\"

it should give you the desktop location on any pc. then, just add the
filenames, i have no idea if they're hard coded, in cells or what.

--


Gary Keramidas
Excel 2003


"Jim Berglund" wrote in message
...
I may have made an error in judgment by asking this question again, but
having played around with it, I can state the concern properly...

I have created a worksheet which has to run on various user's PC's. It
takes two Do Not Call List area code files, joins them, reformats the data
and then determines if any if the data is also found in data from a
reverse telephone directory, and creates a list of numbers that can be
called.

The three data files used are downloaded from the Internet, onto the
user's Desktop. My Excel spreadsheet needs to open the files. The users
typically have Windows 7 or Vista.

I've been told that I can access these files with
Workbooks.Open Filename:="..\Desktop\XXX.csv"

This works on Windows 7 machines, but not on Vista - the only difference
in the software used.

Is there a simple way to fix this?

Jim Berglund