ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   File Path (https://www.excelbanter.com/excel-programming/437102-file-path.html)

Max2073

File Path
 
Help needed.

I developed a macro that only I used. However, the macro is now required to
be used by others.

The macro opens the required files from my C:\documents and
settings\max28052\ etc - the files are automatically named and saved to
officers c:\documents and settings\"username"\ after being exported from the
corporate database. The file names are always the same regardless of the
officer. The only differences in the file path eg. username.

Is there a way that I can change the marco to selected the required files
from the c:\documents and settings\"username of the logged on user"\help.xls
etc.

Any help would be greatly appreciated.

Jacob Skaria

File Path
 
Try

Msgbox Environ("UserProfile") & "\help.xls"

--
Jacob


"Max2073" wrote:

Help needed.

I developed a macro that only I used. However, the macro is now required to
be used by others.

The macro opens the required files from my C:\documents and
settings\max28052\ etc - the files are automatically named and saved to
officers c:\documents and settings\"username"\ after being exported from the
corporate database. The file names are always the same regardless of the
officer. The only differences in the file path eg. username.

Is there a way that I can change the marco to selected the required files
from the c:\documents and settings\"username of the logged on user"\help.xls
etc.

Any help would be greatly appreciated.



All times are GMT +1. The time now is 02:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com