Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default File Path

Kevin Smith wrote...
You can use Environ("UserName").

Change you code from ...

Workbooks.Open Filename:= _
* * * * "C:\Documents and Settings\ksmit40\Desktop\IDCplan.xls"

To...

Workbooks.Open Filename:= _
* * * * "C:\Documents and Settings\" & _
Environ("UserName") & "\Desktop\IDCplan.xls"

....

Better to use Environ("USERPROFILE") which gives the full profile
directory path and won't need to be changed when/if OP's users upgrade
to Windows Vista or 7 where profiles are stored under C:\Users rather
than C:\Documents and Settings.
 
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
File path stew Excel Discussion (Misc queries) 8 January 23rd 09 09:23 PM
Variabilize File Path or File Name in SumProduct (and Vlookup too) Mike H. Excel Worksheet Functions 2 January 7th 08 09:34 PM
Formula too long - new file path is shorter than old file path - Excel 2003 Greg J Excel Worksheet Functions 1 November 22nd 06 05:16 PM
file path Jane Excel Discussion (Misc queries) 1 August 17th 06 05:08 PM
Excel updating from XML file - file path specific? Sean Excel Discussion (Misc queries) 4 August 5th 05 12:56 PM


All times are GMT +1. The time now is 11:35 PM.

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

About Us

"It's about Microsoft Excel"