View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JingleRock[_2_] JingleRock[_2_] is offline
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.