Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default Opening Files on other User's Desktops

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 273
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.


"Jim Berglund" wrote:

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

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default Opening Files on other User's Desktops

I tried this and got the string for the UserName. Thanks,

My users won't be able to do this - in fact, I don't want them touching the
code. Is there any way I can make this work in a generic way? I've tried all
the suggestions so far, without success.

Jim

"Gary Keramidas" wrote in message
...
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


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default Opening Files on other User's Desktops

you need to provide more information. we have no idea what code is needed
because we don't know what you're trying to do.

tell us where you get the filename from. is there going to be a button the
click to open the file? with more info, somebody here can provide you a code
solution to do what you want, it's not that difficult, as long as we get the
information.

--


Gary Keramidas
Excel 2003


"Jim Berglund" wrote in message
...
I tried this and got the string for the UserName. Thanks,

My users won't be able to do this - in fact, I don't want them touching
the code. Is there any way I can make this work in a generic way? I've
tried all the suggestions so far, without success.

Jim

"Gary Keramidas" wrote in message
...
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





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default Opening Files on other User's Desktops

this code will open the 430.csv file on anybody's desktop, as long as they
haven't modified their user profile:

Workbooks.Open Filename:=environ("Userprofile") & "\Desktop\403.csv"


--


Gary Keramidas
Excel 2003


"Jim Berglund" wrote in message
...
I tried this and got the string for the UserName. Thanks,

My users won't be able to do this - in fact, I don't want them touching
the code. Is there any way I can make this work in a generic way? I've
tried all the suggestions so far, without success.

Jim

"Gary Keramidas" wrote in message
...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening Quattro Pro for Windows files (*.WB1 Files) using Excel 20 PoundMutt Excel Discussion (Misc queries) 1 June 20th 07 03:50 AM
Excel 2002 on TWO desktops? Don Guillett Excel Discussion (Misc queries) 4 April 8th 07 03:13 PM
How do i set up my workbooks in different desktops? Pablo Excel Discussion (Misc queries) 1 February 16th 07 06:39 PM
How can I view files chronologically when opening multiple files Stevilsize Excel Discussion (Misc queries) 3 July 26th 05 12:49 AM
Locating a user's Program Files cush Excel Programming 6 June 4th 05 10:17 PM


All times are GMT +1. The time now is 08:54 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"