Anyone know how to do the following? I want to tell a function that when I call it it should call another function of my choice. In the code below I've tried to illustrate what I mean.
I run Test.
It tells CallThat to run Test2.
Test2 shows the first messagebox.
Then it tells CallThat to run Test3.
Test3 shows the second messagebox.
Using this in an event-class where i want to be able to specify what function should be called.Code:Sub Test() CallThat Test2 CallThat Test3 End Sub Sub CallThat(CallWhat As Variant) Call CallWhat End Sub Sub Test2() MsgBox "I was called" End Sub Sub Test3() MsgBox "And I was called after that" End Sub




Reply With Quote