I want to do a CallByName for some Subs but I just can't get it to go.
Everything goes fine until execution reaches the CallByName
, then I have problems:
- Whenever I use
Me
, it complains about a compile error - And if I use
frmMyServer
, it says "object or method not supported"
Question: How do I do this?
This is what I have :
in my 'modHandleData'
Private Sub HandleRequestScriptedNPC(...)
' ...
NPCMethod = "Scripted_Npc_" & NpcNum
CallByName Me, NPCMethod, VbMethod, NpcNum, Index
End Sub
in my 'modScriptedNPC'
Public Sub Scripted_Npc_9(ByVal NpcNum As Long, PlayerNum As Long)
SendOneOptionMsg PlayerNum, "NPC 9", "NPC 9 talks." & vbCrLf & "Then gives you a clue"
End Sub