![]() |
Error 424 : Object required
I have a class module called "Node" which has a method with the following
heading: Public Sub ini() From another module, "module2", I have the following code: Dim root As Node Set root = New Node root.ini When I try to run this, i get "Runtime error 424: Object required". What am I doing wrong? |
Error 424 : Object required
With this in a standard module:
Sub test() Dim root As Node Set root = New Node root.ini End Sub and this in a class module called "Node" Public Sub ini() MsgBox "Hello" End Sub I don't get any errors. Perhaps you should step through your code (F8) and see exactly where your code fails (there are several useful tools under Debug that can help you figure out what is going wrong and where - F8 will step through your code one line at a time). "vivmaha" wrote: I have a class module called "Node" which has a method with the following heading: Public Sub ini() From another module, "module2", I have the following code: Dim root As Node Set root = New Node root.ini When I try to run this, i get "Runtime error 424: Object required". What am I doing wrong? |
Error 424 : Object required
Thank you. I thought by clicking 'debug' on the error message I would get to
the exact line that crashed. F8 carried me to the real line. "JMB" wrote: With this in a standard module: Sub test() Dim root As Node Set root = New Node root.ini End Sub and this in a class module called "Node" Public Sub ini() MsgBox "Hello" End Sub I don't get any errors. Perhaps you should step through your code (F8) and see exactly where your code fails (there are several useful tools under Debug that can help you figure out what is going wrong and where - F8 will step through your code one line at a time). "vivmaha" wrote: I have a class module called "Node" which has a method with the following heading: Public Sub ini() From another module, "module2", I have the following code: Dim root As Node Set root = New Node root.ini When I try to run this, i get "Runtime error 424: Object required". What am I doing wrong? |
Error 424 : Object required
Glad to help.
"vivmaha" wrote: Thank you. I thought by clicking 'debug' on the error message I would get to the exact line that crashed. F8 carried me to the real line. "JMB" wrote: With this in a standard module: Sub test() Dim root As Node Set root = New Node root.ini End Sub and this in a class module called "Node" Public Sub ini() MsgBox "Hello" End Sub I don't get any errors. Perhaps you should step through your code (F8) and see exactly where your code fails (there are several useful tools under Debug that can help you figure out what is going wrong and where - F8 will step through your code one line at a time). "vivmaha" wrote: I have a class module called "Node" which has a method with the following heading: Public Sub ini() From another module, "module2", I have the following code: Dim root As Node Set root = New Node root.ini When I try to run this, i get "Runtime error 424: Object required". What am I doing wrong? |
All times are GMT +1. The time now is 09:25 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com