ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Deleting an entry from a ini file (https://www.excelbanter.com/excel-programming/339380-deleting-entry-ini-file.html)

vqthomf

Deleting an entry from a ini file
 
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

Gareth[_6_]

Deleting an entry from a ini file
 
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

vqthomf wrote:
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



All times are GMT +1. The time now is 10:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com