First Custom Menu

  • Thread starter Thread starter George
  • Start date Start date
G

George

I've created a menu, and I've copied some of the standard menu items to it.
There is one, Export, that I want to make execute some specfic code. I know
how to create a function and execute that code: No problem.

Here's the question: I'd like to execute something different depending on
which form was open when the user evoked the menu item. Optimally, I would
store my custom action in each form's class module, but I do not know how to
ascertain which form was open when the menu was invoked.

Thanks for your help,
George
 
Fabulous. Extremely helpful.
Now, "all" my forms have a Public Sub Export_XLS, and this calls it.

Function Export_FormData()
On Error GoTo Error_Proc
Forms(Screen.ActiveForm.Name).Export_XLS
Exit_Function:
Exit Function

Error_Proc:
MsgBox "Sorry: I have not yet added this functionality" & vbCrLf & _
"Form: " & Screen.ActiveForm.Name
End Function
 
Back
Top