Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I create a excel Template to enter data into same workbook
I want to create a Template in Excel where date can be entered to create new
records in the a different sheet in the same workbook. I can't seem to work out how to do this in 2003. Help. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I create a excel Template to enter data into same workbook
Use the change event for that cell (where the user enters the date).
http://www.cpearson.com/excel/events.htm Here is an example that finds the matching date in column 1 of the Different sheet, then inserts 3 rows below it if found. (as an example) Private Sub Worksheet_Change(ByVal Target As Range) Dim rng as Range, rng1 as Range, res as Variant if target.address = "$B$9" Then With Worksheets("Different") set rng = .Range(.Cells(2,1),.Cells(rows.count,1).End(xlup)) End with res = Application.Match(Target,rng,0) if not iserror(res) then set rng1 = rng(res) rng1.offset(1,0).Resize(3).EntireRow.Insert end if End if End Sub Right click on the Sheet Tab, select view code. and place like the above code in that module. -- Regards, Tom Ogilvy "PM Rusty" <PM wrote in message ... I want to create a Template in Excel where date can be entered to create new records in the a different sheet in the same workbook. I can't seem to work out how to do this in 2003. Help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Create, name, open, and enter data in new sheet - from template | Excel Discussion (Misc queries) | |||
How do I append data to an Excel workbook using a template? | Excel Discussion (Misc queries) | |||
create a data entry form template in Excel 2003? | Excel Discussion (Misc queries) | |||
Create a new sheet in a workbook from a template | Excel Programming | |||
Best way to create a workbook template that allows data entry and purchase order req to be created from it | Excel Programming |