![]() |
Copying a macro to use in another workbook
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! |
Copying a macro to use in another workbook
Never mind. I figured out what my problem was.
Thanks! Liz "Liz C" wrote: 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! |
Copying a macro to use in another workbook
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. "Liz C" wrote: Never mind. I figured out what my problem was. Thanks! Liz "Liz C" wrote: 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! |
All times are GMT +1. The time now is 01:36 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com