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:
Jump to content
Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.Create Account How it Works
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.