Hi!
I'am using excel 2007, and im trying to write to an .ini file dynamicly.
And now I need sum guidance on a couple of things.
The purpose of the file is like this:
I want to be able to store new configurations, and then choose them from a dropdown.
This is my pseudo code:
First a function, that opens the file and changes an ID, this ID get incremented everytime, a new configuration is added.
Then I use append to add new configurations, the ID is taken and added to be able to identify the config, after the file is appended, ID get incremented.
Then I run a "for loop" X the times of the ID. To add the name of the configs into a dropdown.
But heres the trouble
I fetch the ID from the file
But I need to convert it to a number to be able to increment it?
I have tried:
id2 = GetPrivateProfileString32(sPath, _
"PERSONUPPGIFTER", "Fornamn")
Dim id As Integer
id = CInt(id2)
id = id + 1
but can't get it to work...
Is there a simpler way or am I doing this efficietly?
/Cheers Carl
I'am using excel 2007, and im trying to write to an .ini file dynamicly.
And now I need sum guidance on a couple of things.
The purpose of the file is like this:
I want to be able to store new configurations, and then choose them from a dropdown.
This is my pseudo code:
First a function, that opens the file and changes an ID, this ID get incremented everytime, a new configuration is added.
Then I use append to add new configurations, the ID is taken and added to be able to identify the config, after the file is appended, ID get incremented.
Then I run a "for loop" X the times of the ID. To add the name of the configs into a dropdown.
But heres the trouble
I fetch the ID from the file
But I need to convert it to a number to be able to increment it?
I have tried:
id2 = GetPrivateProfileString32(sPath, _
"PERSONUPPGIFTER", "Fornamn")
Dim id As Integer
id = CInt(id2)
id = id + 1
but can't get it to work...
Is there a simpler way or am I doing this efficietly?
/Cheers Carl