Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming,microsoft.public.excel.misc
|
|||
|
|||
![]()
Although an ini file is just a plain text file ini files have a structure
[SectionName1] Keyname1=abc Keyname2=123 If your ini file is like this all you need to know is the section-name(s) and key-name(s) you are concerned with (and of course the file-name & path). APIs GetPrivateProfileString and WritePrivateProfileString to read/write the values will do all the work for you. I'm sure if you search these terms together with something like "modify ini file" you will find hundreds of examples. Regards, Peter T "Jim" wrote in message ... Hello, When writing multiple values to a .ini file I'm familiar with the following basic code: Open "c:\my.ini" For Output As #1 Print #1, "1" Print #1, "2" Print #1, "3" Close #1 Is there a way to modify/write values to specific lines only, for example modifying the "2" value on line 2 to "5", without overwriting the other lines with their unchanged values? Thanks for any feedback! Jim |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to modify specific lines in a .ini file? | Excel Discussion (Misc queries) | |||
Modify The Code For Importing Text File into an Excel File | Excel Programming | |||
Create/modify date for specific sheets? | Excel Discussion (Misc queries) | |||
modify a macro to apply to a specific range of cells | Excel Discussion (Misc queries) | |||
excel97 vba to append lines to text file overwriting last 2 lines | Excel Programming |