Run-time error 424 Object required

Reply

Join Date: Apr 2008
Posts: 491
Reputation: veledrom is an unknown quantity at this point 
Solved Threads: 0
veledrom veledrom is offline Offline
Posting Pro in Training

Run-time error 424 Object required

 
0
  #1
Jan 22nd, 2009
Hi,

Code below generates this error "Run-time error 424 Object required". What can i do? VB6.

thanks

Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Private Sub Command3_Click()
  2. My.Computer.Registry.CurrentUser.CreateSubKey ("TestKey")
  3. End Sub
Last edited by veledrom; Jan 22nd, 2009 at 6:18 am. Reason: .
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 2,082
Reputation: debasisdas will become famous soon enough debasisdas will become famous soon enough 
Solved Threads: 124
debasisdas's Avatar
debasisdas debasisdas is offline Offline
Postaholic

Re: Run-time error 424 Object required

 
0
  #2
Jan 22nd, 2009
what is My ?

is that an object ?
Share your Knowledge.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: Run-time error 424 Object required

 
0
  #3
Jan 22nd, 2009
Use VB.Net.... not VB 6

Seriously, I like VB6 a thousand times more than .NET, but the fact is, that code is meant for the .NET platform. VB 6 is not quite that object oriented and structured. I suggest however, that to do the same thing in VB6, use WSH. Using the native VB commands to modify the registry (all API Calls) is really ugly. So I guess something like:
  1. Dim wsh
  2. Set wsh = CreateObject("WScript.Shell")
  3. wsh.regwrite "HKCU\testkey\", "hi", "REG_SZ"
  4. Set wsh = Nothing
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC