Deleting an entry from a ini file

G

Guest

Hi I am using an ini file to store setup properties for a form, this so that
different users get different buttons etc ...
What I need to do is remove a user if they don't need to use it.
TIA
Charles
 
G

Gareth

Just use the same APIs for writing to the ini file, passing 0& for the
value:

'Delete a property
WritePrivateProfileString SECTION_NAME, PROPERTY_NAME, 0&, INI_FILENAME
'Delete a section
WritePrivateProfileString SECTION_NAME, 0&, 0&, INI_FILENAME

HTH,
Gareth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top