Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 661
Default Worksheet Specific Code

I have a template worksheet that I update and then copy 50 times (one for
each state)

There is a macro that is linked to the worksheet that executes upon double
click. How can I make this sheet specific code copy when the sheet is copied?
Or is there a way to link to another sub that will do the same thing?

Sample Code:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
'Tester Sub
MsgBox "Testing Here", vbInformation, "OH NO!"
End Sub

--
Paul
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default Worksheet Specific Code

This kind of code (in the worksheet module) should copy when you copy the
worksheet.

Are you copying the cells on the worksheet or are you really copying the
worksheet???


Paul wrote:

I have a template worksheet that I update and then copy 50 times (one for
each state)

There is a macro that is linked to the worksheet that executes upon double
click. How can I make this sheet specific code copy when the sheet is copied?
Or is there a way to link to another sub that will do the same thing?

Sample Code:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
'Tester Sub
MsgBox "Testing Here", vbInformation, "OH NO!"
End Sub

--
Paul


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 661
Default Worksheet Specific Code

That did the trick, I was just copying the cells. Thanks for your help!


"Dave Peterson" wrote:

This kind of code (in the worksheet module) should copy when you copy the
worksheet.

Are you copying the cells on the worksheet or are you really copying the
worksheet???


Paul wrote:

I have a template worksheet that I update and then copy 50 times (one for
each state)

There is a macro that is linked to the worksheet that executes upon double
click. How can I make this sheet specific code copy when the sheet is copied?
Or is there a way to link to another sub that will do the same thing?

Sample Code:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
'Tester Sub
MsgBox "Testing Here", vbInformation, "OH NO!"
End Sub

--
Paul


--

Dave Peterson

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
HELP! Object specific Code dee Excel Programming 3 February 13th 05 07:16 PM
VB code to make Excel open in a specific worksheet OscarC Excel Programming 2 December 7th 04 09:57 PM
Code for new row and specific filling down Lucy[_2_] Excel Programming 1 June 23rd 04 11:44 AM
Excel XP VBA code to search all macro code in Excel module for specific search string criteria Ed[_18_] Excel Programming 4 May 20th 04 02:08 PM
VBA code to open a specific worksheet MohK Excel Programming 2 October 29th 03 06:02 PM


All times are GMT +1. The time now is 08:40 AM.

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"