Then, I want to import them to a listbox
I've found a few methods to do this, but you have to know the exact key name to read it.
I am making a start up editor that looks somewhat like this:
(List Boxes)
Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!
01 Dim EnabledRun As Collection 02 Dim DisabledRun As Collection 03 Dim strK As Variant 04 Const E_Run_Path = "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" 05 Const D_Run_Path = "SOFTWARE\Microsoft\Windows\CurrentVersion\HS_Disabled_Run" 06 07 Private Sub Form_Load() 08 09 Set EnabledRun = EnumRegistryValues(HKEY_LOCAL_MACHINE, E_Run_Path) 10 Set DisabledRun = EnumRegistryValues(HKEY_LOCAL_MACHINE, D_Run_Path) 11 12 For Each strK In EnabledRun 13 For Counter = 0 To UBound(strK) 14 lstEnabled.List = strK(Counter) '<<<This isn't working 15 Next 16 Next 17 18 End SubSo, now I am having trouble with the ListBox. See line 14.
' EnumRegistryValues - Retrieve all values under a Registry key 'Date: 4/8/2000 Updated: 7/4/2000 'Versions: VB4/32 VB5 VB6 Level: Intermediate 'Author: The VB2TheMax Team ' Enumerate values under a given registry key ' ' returns a collection, where each element of the collection ' is a 2-element array of Variants: ' element(0) is the value name, element(1) is the value's valueWhat I need to do now is print the name(0) and element(1) of each value, one line per 1 name and 1 element.
Set RandomCrap = EnabledRun.Item(1) MsgBox RandomCrapI have tried making the RandomCrap object many different object types like String, Integer, and String. It just won't work...
Edited by [YF] Daniel, 25 June 2005 - 10:24 PM.
0 members, 0 guests, 0 anonymous users
Community Forum Software by IP.Board
Licensed to: Geeks to Go, Inc.