Copying a macro to use in another workbook

  • Thread starter Thread starter Liz C
  • Start date Start date
L

Liz C

I have the following macro I'm using in a workbook and would like to use it
in another workbook.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.Interior.ColorIndex = xlNone
Rows(Target.Row).Interior.ColorIndex = 17
Columns(Target.Column).Interior.ColorIndex = 17
End Sub

Will someone please tell me how to copy it to use in the other workbook?

Thank you in advance for your help!
 
apart from copy/paste , yuo can "drag" code modules from one project to
another -- useful if yuo need to rebuild workbooks or re-use useful code.
You can also drag a module onto your desktop and back into a project from
the desktop.
 
Back
Top