Activate a moacro subroutine from a userform command button

R

Roger on Excel

[Excel 2003]

I use macros in a worksheet - for example:

Sub DateStamp()
Range("b14") = Date & " " & Time 'Date And Time
End Sub

I access the macro with a command button in the spreadsheet.

I would now like to access the same code using a command button on a Userform.

I guess I could repeat the same code in the command button on the userform,
but I would rather not duplicate the code.

Is there a way to do this?

Many thanks,

Roger
 

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