Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
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
Create, name, open, and enter data in new sheet - from template Ann~ Excel Discussion (Misc queries) 6 January 8th 07 11:59 PM
How do I append data to an Excel workbook using a template? Statman Excel Discussion (Misc queries) 2 May 31st 06 06:58 PM
create a data entry form template in Excel 2003? david.bottomley@haltoncollege Excel Discussion (Misc queries) 0 January 19th 05 09:59 AM
Create a new sheet in a workbook from a template RogerNZ Excel Programming 1 June 16th 04 03:23 AM
Best way to create a workbook template that allows data entry and purchase order req to be created from it Cheryl[_2_] Excel Programming 0 April 29th 04 02:01 PM


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