#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Forms and Data

Hi,
I am newbie with Excel so please tolerate my questions.
I am trying to incorporate a form and a database in the one file.
Eg - If I used the pre-defined Invoice template, how can I accumulate the
data in a list for each and every Invoice that is created.

Not sure if I am clear with what I need, but what I envisaged, was the first
page containing the Invoice Template where the details are entered, making
this a printable invoice, but as this information is entered, I need the
information to go into the second tab of the file which ideally would
accumulate all and every detail from the invoices.

Is it at all possible ?
Thank you in advance for your help...


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default Forms and Data

Dinky,

You could use a macro. Let's say that you have two sheets: 'Invoice Form' and 'Database'

Your macro could be along these lines (cell addresses and columns would need to be customized, of
course)

Sub Transfer()
Dim myRow As Long
Dim shtF As Worksheet
Dim shtDB As Worksheet

Set shtF = Worksheets("Invoice Form")
Set shtDB = Worksheets("Database")

'Find the first free row in the database
myRow = shtDB.Cells(Rows.Count,1).End(xlUp)(2).Row

'Transfer the data
shtDB.Cells(myRow,1).Value = shtF.Range("D1").Value
shtDB.Cells(myRow,2).Value = shtF.Range("D3").Value
shtDB.Cells(myRow,3).Value = shtF.Range("H12").Value
shtDB.Cells(myRow,4).Value = shtF.Range("C15").Value

'Clear theForm (This part is optional)
shtF.Range("D1").ClearContents
shtF.Range("D3").ClearContents
shtF.Range("H12").ClearContents
shtF.Range("C15").ClearContents

End Sub

I hope you can see the structure and pattern..... The macro could be assigned to a button on the
"Invoice Form" worksheet with the title "Transfer data and clear form"

HTH,
Bernie
MS Excel MVP


"Dinky" wrote in message
...
Hi,
I am newbie with Excel so please tolerate my questions.
I am trying to incorporate a form and a database in the one file.
Eg - If I used the pre-defined Invoice template, how can I accumulate the
data in a list for each and every Invoice that is created.

Not sure if I am clear with what I need, but what I envisaged, was the first
page containing the Invoice Template where the details are entered, making
this a printable invoice, but as this information is entered, I need the
information to go into the second tab of the file which ideally would
accumulate all and every detail from the invoices.

Is it at all possible ?
Thank you in advance for your 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
Data Forms fpc001 Excel Discussion (Misc queries) 1 August 15th 06 01:29 PM
Entering data on custom forms. famdamly Excel Discussion (Misc queries) 0 December 10th 05 02:37 PM
Using forms to enter Data into an Expense Sheet. RayJ Excel Discussion (Misc queries) 1 July 5th 05 12:58 AM
Using data forms slaforest Excel Discussion (Misc queries) 1 June 29th 05 08:45 PM
Forms Toolbar vs. Control Toolbox vs. Data Validation for drop dow Scott Excel Discussion (Misc queries) 1 February 1st 05 01:51 PM


All times are GMT +1. The time now is 12:23 PM.

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"