Ok I have a form where our employees enter in some info and press the add button. I want this add button to take the data entered and transfer it to a database. Each time the button is pressed it needs to drop a row and add the new information entered. I have including my workbook.
Hello rbyrd023,
You will get more answers to question if post your workbook in Excel 2003 format. The more people who can view your workbook, the faster the turn around will be.
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Starbelow the post.
3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
See the Contacts form here
http://excel-it.com/
The code will adapt to do what you want
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel consulting, free examples and tutorials visit Excel Consulting-Excel VBA
Check out the free Excel Toolbar
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
Code Tags: Make your code easier for us to read
Thank you very much for the reminder. Here is the 2003 version of my workbook. Thanks to all!!
have you checked the download that I suggested?
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel consulting, free examples and tutorials visit Excel Consulting-Excel VBA
Check out the free Excel Toolbar
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
Code Tags: Make your code easier for us to read
I went to the site, but couldn't find anything...... today is one of those off my rocker days!!!
It's on this page
http://excel-it.com/vba_examples.htm
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel consulting, free examples and tutorials visit Excel Consulting-Excel VBA
Check out the free Excel Toolbar
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
Code Tags: Make your code easier for us to read
Hello rbyrd023,
In the event you are having trouble adapting the example, I have updated your "Add" button to copy the information. The code below has been added to the attached workbook.
Code:Sub AddButton() ' ' AddButton Macro ' Dim DstRng As Range Dim DstRngEnd As Range Dim I As Long Dim Items As Variant Dim SrcWks As Worksheet Set SrcWks = Worksheets("Information Sheet") Set DstWks = Worksheets("Sheet2") Set DstRng = DstWks.Range("A2") Set DstRngEnd = DstWks.Cells(Rows.Count, DstRng.Column).End(xlUp) Set DstRng = IIf(DstRngEnd.Row < DstRng.Row, DstRng, DstRngEnd.Offset(1, 0)) Items = Array("E19", "G8", "E11", "I12", "E13", "E15", "E21", "E23", "I21") For I = 0 To UBound(Items) DstRng.Offset(0, I) = SrcWks.Range(Items(I)) Next I End Sub
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Starbelow the post.
3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
Great!! The code works! Thank you very much
The "control form" on the website suggested is Great Too! Thank you very much
Where would I be without this community????? LOST!
Thanks Again Everybody!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks