G
Guest
I created a form, BaseForm, with a button as sort of a base class for some future windows. I added a button and put a simple MsgBox in the _click event that says "Hi from base" and I set the button's modifier property to "Protected."
Created DerivedForm inherited from BaseForm. Was able to go in and add a MsgBox to the _Click event for the button (as expected) that says "Hi from derived". When I run the app and click the button, I get both message boxes "Hi from base" then "Hi from derived"
My question is why can I not do this same thing with a Sub or Function? If I create BaseForm.TestThis(), I cannot seem to "extend" the code in DerivedForm.TestThis. Instead, I must overload or shadow it. Why the different behavior
Thank you. Bill
Created DerivedForm inherited from BaseForm. Was able to go in and add a MsgBox to the _Click event for the button (as expected) that says "Hi from derived". When I run the app and click the button, I get both message boxes "Hi from base" then "Hi from derived"
My question is why can I not do this same thing with a Sub or Function? If I create BaseForm.TestThis(), I cannot seem to "extend" the code in DerivedForm.TestThis. Instead, I must overload or shadow it. Why the different behavior
Thank you. Bill