Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 81
Default code on a template sheet

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
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
How to merge data in Excel - one sheet to template sheet? Gabriela Excel Worksheet Functions 2 July 26th 07 03:34 PM
adding code from a template NickHK Excel Programming 1 December 22nd 06 01:29 AM
template code in one place bill Excel Programming 3 May 18th 06 03:50 PM
Opening a template.xls using VBA code. a Excel Programming 1 December 19th 05 02:40 AM
Opening a template .xls with VBA code IXLINXL Excel Programming 5 December 1st 04 08:05 PM


All times are GMT +1. The time now is 12:21 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"