ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using registry for data storage and transfer? (https://www.excelbanter.com/excel-programming/454573-using-registry-data-storage-transfer.html)

Terry Pinnell[_4_]

Using registry for data storage and transfer?
 
I posted this a week ago in 'Copy multi-line variable to first empty
row' but suspect it may have been overlooked in that very long thread.
I'm still interested in opinions on using the registry for data transfer
please, so here's a paste:

--------------------

My macro is now working sweetly, thanks to Claus, using an intermediate
text file to transfer the variables from the external source, my macro
written with Macro Express Pro.

I've just come across the SaveSetting and GetSetting VBA functions to
save and recover data from the registry. MX Pro also has similar
commands. So would this be a viable and possibly superior alternative
method?

Terry, East Grinstead, UK

Peter T[_8_]

Using registry for data storage and transfer?
 
"Terry Pinnell" wrote in message
I've just come across the SaveSetting and GetSetting VBA functions to
save and recover data from the registry. MX Pro also has similar
commands. So would this be a viable and possibly superior alternative
method?


Form most purposes in VBA SaveSetting, GetSetting and DeleteSetting are a
very viable alternative to using the various registry APIs.

They might be considered superior in the sense of very simple and no risk
using the APIs incorrectly. Less superior in the sense you are restricted to
this path in the registry:
HKEY_CURRENT_USER\Software\VB and VBA Program Settings\

Peter T




Terry Pinnell[_4_]

Using registry for data storage and transfer?
 
"Peter T" wrote:

"Terry Pinnell" wrote in message
I've just come across the SaveSetting and GetSetting VBA functions to
save and recover data from the registry. MX Pro also has similar
commands. So would this be a viable and possibly superior alternative
method?


Form most purposes in VBA SaveSetting, GetSetting and DeleteSetting are a
very viable alternative to using the various registry APIs.

They might be considered superior in the sense of very simple and no risk
using the APIs incorrectly. Less superior in the sense you are restricted to
this path in the registry:
HKEY_CURRENT_USER\Software\VB and VBA Program Settings\

Peter T


Thanks Peter, understood. That restriction doesn't worry me. I already
use one other 'fenced' key for working with Macro Express Pro. Once it's
in the Regedit Favourites it's easy to find, and means I'm unlikely to
cause widespread damage!

I'll aim to try a small project.


All times are GMT +1. The time now is 06:10 PM.

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