PC Review


Reply
Thread Tools Rate Thread

code on a template sheet

 
 
=?Utf-8?B?U2FpbnRzbWFu?=
Guest
Posts: n/a
 
      2nd Apr 2007
I have a template page in my workbook which users can copy & rename to record
cost estimates
Part of the sheet compares the previous estimate with the lastest
I want an update button which copies columns F-H & pastes the values in
columns C-E. This code needs to be in the 'template' sheet, but obviously
needs to work whenever the sheet is copied & renamed

I have a macro which works on a global scale, but how do I make it sheet
specific for sheets that haven't been created yet?

Sub copylast()
Sheets("Shell and Core").Select
Range("f6:h50").Select
Selection.Copy
Range("c6").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("f6").Select
End Sub
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
copying a template sheet and inputting a formula into another sheetthat references the new sheet A & S Microsoft Excel Programming 1 29th Jul 2009 08:59 PM
How to merge data in Excel - one sheet to template sheet? =?Utf-8?B?R2FicmllbGE=?= Microsoft Excel Worksheet Functions 2 26th Jul 2007 03:34 PM
Create new sheets based off Data sheet, and template sheet Midget Microsoft Excel Programming 2 1st May 2007 09:55 PM
Writing data from one sheet to another template sheet and change the filename freeblue11@gmail.com Microsoft Excel Discussion 1 2nd Nov 2006 03:15 AM
Create New Sheet from template sheet =?Utf-8?B?RGF2aWQgQ295bGU=?= Microsoft Excel Programming 1 31st Oct 2006 02:37 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:27 AM.