I have used eval successfully in programming using other languages but it does not seem to be supported in PowerPoint Office 2003 vba.
I want to run some code which will open the appropriate form based upon which slide is active when you call the function. I am storing the form name as a slide level tag value. All is working great except I can't seem to find a way to basically build a string which contains a run time variable value(the form name) and run the resulting string as a command.
Below is a sample of my code:
Sub AAAShowSlideForm()
Dim strForm As String
Dim slidename As String
Dim buildCommandString As String
On Error GoTo errhandler
slidename = ActiveWindow.Selection.SlideRange.name
'Module2.RetrieveSlideTabValue_Slide(slidename, "form") is a routine I have written
'which returns the value of the specified tag
strForm = Module2.RetrieveSlideTabValue_Slide(slidename, "form")
buildCommandString = strForm & ".show"
eval(buildCommandString)
Exit Sub
errhandler:
MsgBox "There's an error"
End Sub
CallbyName does not seem to fit my scenario?
Any assistance would be much appreciated.
Thanks