Access an ini file with vba

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Could someone show me an example of using an ini file to access a file
path/name. I don't want to hardcode network paths within my program but would
rather have them reference externally. Also would need an example of the
syntax in the ini file.
Here is kinda what I need.

INI file:
myWorksheet = "\\xxxbns03\drv_A\FolderName\Template.xls"

VBA:
oExcel.Workbooks.Open myFile.INI "myWorksheet"



Thanks in advance
 
See whether what Randy Birch has at
http://vbnet.mvps.org/code/file/pprofilebasic.htm is enough to get you
going.

(Obligatory warning: Randy's site is aimed at VB programmers. Since there
are significant differences between what controls are available for forms in
VB vs. Access, some of his code samples do not port directly into Access.
I'm reasonably certain, though, that this particular one should without
significant problems)
 
Back
Top