Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Programmatically create DWORD value - how

How can I programmatically create a DWORD value in the registry?

I've pored over the newsgroups and have not been successful in finding code
that works.

I have admin rights to my machine.

Surely someone must have created a simple wrapper function where I can
perform something like:

Psuedo:

Dim regDword As String
Dim regDwordVal as String
regDword = "HKEY_LOCAL_MACHINE\Software\Microsoft\Office\11.0 \Excel\MyDword"
regDwordVal = "333"
If NOT DwordExists(regDword )
CreateDword(regDword , regDwordVal)
End If

Also, I'd love to be able to query the Dword value too. E.g.

Msgbox GetDwordVal(regDword)


Thanks.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Programmatically create DWORD value - how

See the code at http://www.cpearson.com/excel/registry.htm


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting LLC
www.cpearson.com
(email on the web site)

<- wrote in message ...
How can I programmatically create a DWORD value in the registry?

I've pored over the newsgroups and have not been successful in finding
code that works.

I have admin rights to my machine.

Surely someone must have created a simple wrapper function where I can
perform something like:

Psuedo:

Dim regDword As String
Dim regDwordVal as String
regDword =
"HKEY_LOCAL_MACHINE\Software\Microsoft\Office\11.0 \Excel\MyDword"
regDwordVal = "333"
If NOT DwordExists(regDword )
CreateDword(regDword , regDwordVal)
End If

Also, I'd love to be able to query the Dword value too. E.g.

Msgbox GetDwordVal(regDword)


Thanks.





  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Programmatically create DWORD value - how

Bravo. That's the best collection of stuff I've seen. The only thing that
would make it less intimidating would be sample code. I had to play around
with it to get it to work. Not necessarily bad, but I'm not exactly crazy
about poking around the registry unless I know what's gonna happen.

Thanks a lot. I really appreciate the help. This is great.


"Chip Pearson" wrote in message
...
See the code at http://www.cpearson.com/excel/registry.htm


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting LLC
www.cpearson.com
(email on the web site)

<- wrote in message ...
How can I programmatically create a DWORD value in the registry?

I've pored over the newsgroups and have not been successful in finding
code that works.

I have admin rights to my machine.

Surely someone must have created a simple wrapper function where I can
perform something like:

Psuedo:

Dim regDword As String
Dim regDwordVal as String
regDword =
"HKEY_LOCAL_MACHINE\Software\Microsoft\Office\11.0 \Excel\MyDword"
regDwordVal = "333"
If NOT DwordExists(regDword )
CreateDword(regDword , regDwordVal)
End If

Also, I'd love to be able to query the Dword value too. E.g.

Msgbox GetDwordVal(regDword)


Thanks.







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to create programmatically a table? Britt Excel Programming 2 November 10th 06 08:51 AM
Create UserForm programmatically Ber Excel Programming 5 September 11th 05 11:20 AM
programmatically create a macro Jim Warren Excel Programming 2 March 16th 05 10:57 PM
help with create spreadsheet programmatically Divyesh Raithatha Excel Programming 1 October 4th 03 08:02 AM
How to create picklists programmatically Harald Staff[_4_] Excel Programming 0 July 16th 03 09:59 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"