Accessing info from INI file 
Author Message
 Accessing info from INI file

Hi Steven,

You can use the PrivateProfileString

MsgBox System.PrivateProfileString( _
          FileName:="C:\Test.ini", _
          Section:=SectionName, _
          Key:=KeyName)

HTH


Quote:
> How can I read variable information from an INI file where
> I want users to store variable information?

> Thanks,

> Steven Pearl



Wed, 16 Jun 2004 02:41:31 GMT  
 Accessing info from INI file
Hi Steven,

To extend to Dave's answer:
if you're not familiar with accessing INI files,
the System.PrivateProfileString will also generate INI files
on the fly.

Run this piece of code (assuming c:\temp is available on your system):
Sub MakeIni()
With System
.PrivateProfileString("c:\temp\Test.INI", "NewSection", "Key1") = "Value
Key1"
.PrivateProfileString("c:\temp\Test.INI", "NewSection", "Key2") = "Value
Key2"
End With
End Sub

Kind regards,
Perry



Quote:
> Hi Steven,

> You can use the PrivateProfileString

> MsgBox System.PrivateProfileString( _
>           FileName:="C:\Test.ini", _
>           Section:=SectionName, _
>           Key:=KeyName)

> HTH



> > How can I read variable information from an INI file where
> > I want users to store variable information?

> > Thanks,

> > Steven Pearl



Wed, 16 Jun 2004 09:36:13 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Committing/Flushing info to an INI file

2. INI-MANAGEMENT: how to locate private Ini-File ?

3. Read/Write INI Files w/Access 7.0

4. Using ini files in Access 2000

5. Convert Excel or Access spreadsheet to INI file format

6. Accessing .INI file

7. Accessing .ini file in connect string

8. Accessing Varialbes in MSACC20.ini file

9. INI file access from VBScripts?

10. Accessing INI files in VB5 ?

11. VB4: How to access ini files???????????????????

12. INI file access different in NT & 95

 

 
Powered by phpBB® Forum Software