Call a Cmd Button

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to use a marco to call/run a Sub statement from a form. The marco
opens the form and then I want it call/run following Sub statement from a cmd
button.

cmdImportData_Click

Thanks for any help.
 
Lamar,

As far as I know, this is not possible, exactly as you stated. I think
your choices are:
1. Whatever the code in the cmdImportData_Click procedure, do the
equivalent thing in the macro using standard macro actions.
2. Change the cmdImportData_Click subprocedure to a Public Function,
and then use the RunCode action in the macro.
3. Do the whole thing in VBA, instead of the macro, using the OpenForm
method, and then the Call method in VBA to run the subprocedure.
 
Back
Top