Quantcast
Channel: Microsoft Outlook Form Programming
Viewing all articles
Browse latest Browse all 108

Command Button to Macro in Contact Script Code

$
0
0
I found these two different ways to have a commandbutton in a contact form run a code from the script that runs a macro from a module in the VBA area. And the words macroname is the name of the macro and the module7 is the module number the macro is in

sub CommandButton6_click
call module7.macroname()
end sub

and there is error "object module7 required"

and then I did:

sub CommandButton6_click
macroname
end sub

and the errror is "type mismatch macroname"

Any way to fix this so I add a...

Command Button to Macro in Contact Script Code

Viewing all articles
Browse latest Browse all 108

Trending Articles