LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default EXCEL 2010 VBA; trying to use INI File stored on local desktop machines

We are migrating from XCL 2003 to XCL 2010. The macro file resides on
a shared network drive. I am having difficulty getting the macro code
to "recognize" (extracting email parameters from the INI file; to be
used for the macro to send an email) the INI file. Each user has his
customized INI file stored on his H:\ drive.

These are my five unsuccessful attempts:

1) Public Const INI_PATH_TMPL = "H:\<USER_ID\My Documents\INI File\"

2) Public Const INI_PATH_TMPL = "\\ServerName\<USER_ID\My Documents
\INI File\"

whe
'sUserID = (Environ$("Username")) '<< THIS IS THE WIN 7 CODE FOR
ANY GIVEN USER

'GetUserID = Replace(sUserID, "corp\", "")

'GetINIFilename = Replace(APP_INI_PATH, "<USER_ID", GetUserID)

3) Public Const INI_PATH_TMPL = "H:\My Documents\INI File\"

4) Public Const INI_PATH_TMPL = "H:\loginID\My Documents\INI File\"

5) Public Const APP_INI_PATH = INI_PATH_TMPL & "Email.ini"

Please help.
 
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
double click excel file on the desktop excel opens but not file? JPT4266 Excel Discussion (Misc queries) 3 May 7th 09 04:24 PM
Connecting to a DB without using the local machines ODBC David Wessell Excel Programming 0 May 3rd 07 04:01 PM
Stoping users from saving tables to their local machines... Philippe Roy Excel Discussion (Misc queries) 1 August 17th 05 06:47 PM
Local excel file to update website Anonymous Chief Excel Programming 0 August 17th 05 02:14 AM
Desktop shortcut to a named Excel file - every time I open it adds a "1" to the file name - how to disable? [email protected] Setting up and Configuration of Excel 2 November 27th 04 09:02 PM


All times are GMT +1. The time now is 06:47 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"