excel macro code in registry

J

Jorge

Hi,

Situation: I am trying to write a excel macro code using
my INI file as an input file and write it to Registry and
my VBA application updates some of its content and then
save it back to my INI file.

Question: Is it safe to use Registry for my INI variables?

My friend told me it is a good idea to use the following
code:
Public Declare Function GetPrivateProfileString
Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal
lpApplicationName As String, ByVal lpKeyName As Any, ByVal
lpDefault As String, ByVal lpReturnedString As String,
ByVal nSize As Long, ByVal lpFileName As String) As Long

Public Declare Function WritePrivateProfileString
Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal
lpApplicationName As String, ByVal lpKeyName As Any, ByVal
lpString As Any, ByVal lpFileName As String) As Long

Can anybody advice me which is the better one.

Thanks in advance.
Jorge
 

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