View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gareth[_6_] Gareth[_6_] is offline
external usenet poster
 
Posts: 158
Default 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