Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default 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!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default 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!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default 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!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copying worksheet to another workbook with a macro more than once RT Excel Programming 2 November 13th 07 04:29 PM
Macro for Copying Worksheet to New Workbook MGC Excel Discussion (Misc queries) 10 August 17th 07 01:57 AM
Macro Copying To Another Workbook?? countryfan_nt[_4_] Excel Programming 2 April 3rd 05 02:38 PM
copying macro to a new workbook JT[_2_] Excel Programming 3 December 15th 04 06:16 PM
Copying VBA modules from one workbook to another with a macro? Revolvr[_2_] Excel Programming 2 May 6th 04 11:04 AM


All times are GMT +1. The time now is 11:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"