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 a contact form script and it runs the the macro the script refers to as I need this very heavily!!
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 a contact form script and it runs the the macro the script refers to as I need this very heavily!!