First Custom Menu

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
 
G

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top