Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / May 2008

Tip: Looking for answers? Try searching our database.

Insert Code with Worksheet

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
iamnu - 08 May 2008 14:49 GMT
Private Sub Worksheet_Change(ByVal Target As Range)
' Do Something
End Sub

I have the above code in Sheet1 of my Workbook.  When I Insert a new
Worksheet, I want the code to be copied to the new Worksheet as well,
OR have the original code work in all Worksheets.

Can someone explain how?
Don Guillett - 08 May 2008 15:37 GMT
Look in the ThisWorkbook module and use this
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)

End Sub

Signature

Don Guillett
Microsoft MVP Excel
SalesAid Software
dguillett1@austin.rr.com

> Private Sub Worksheet_Change(ByVal Target As Range)
> ' Do Something
[quoted text clipped - 5 lines]
>
> Can someone explain how?
iamnu - 08 May 2008 15:52 GMT
> Look in the ThisWorkbook module and use this
> Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
[quoted text clipped - 15 lines]
>
> > Can someone explain how?

Thank you, sir!
Don Guillett - 08 May 2008 16:22 GMT
Glad to help

Signature

Don Guillett
Microsoft MVP Excel
SalesAid Software
dguillett1@austin.rr.com

>> Look in the ThisWorkbook module and use this
>> Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As
[quoted text clipped - 18 lines]
>
> Thank you, sir!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.