GetSetting and SaveSetting

F

Fan924

I can write data to the registry with the following example. I am not
having any luck reading it back and storing it in a worksheet.
Suggestions?
__________________________________

Sub ChangeName(sName As String)
SaveSetting appname:="Euchre", _
section:="PlayerData", _
key:="Name", _
setting:=sName
End Sub

Function GetName()
GetName = GetSetting(appname:="Euchre", _
section:="PlayeData", _
key:="Name")
Range("A1").Value = GetName
End Function

Sub TestIt()
ChangeName "Sick"
MsgBox GetName
End Sub
__________________________________

http://www.dick-blog.com/archives/2004/10/11/storing-data-in-the-registry/
 
H

Harald Staff

You are storing
section:="PlayerData"
and reading
section:="PlayeData"

HTH. Best wishes Harald
 
C

Chip Pearson

Its a typo:
section:="PlayeData", _

you're missing the "r" at the end of Player.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 

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