PDA

View Full Version : Data Input Form Workbook



Anne Troy
02-08-2011, 01:24 PM
I thought we had in our knowledgebase a workbook where we could enter data on a sheet (say, sheet 1) in a nice easy user form (not userform in VBA) layout and hit Enter, and it would move that data to sheet 2 in a flat file format.

If not, is there anyone willing to help me with this? Like, make me a sample with 3 fields or something?

Would be incredibly grateful!

Anne Troy
02-08-2011, 01:25 PM
Hm. My avatar is gone.

Tinbendr
02-08-2011, 01:58 PM
It sure is!!!

I don't know of the KB entry you talking about, but here's a link (http://www.vbaexpress.com/forum/showthread.php?t=25219&highlight=searchkb) to a Excel sheet with all the KB entries.

David

Kenneth Hobs
02-08-2011, 03:23 PM
If there isn't, it should be easy enough to do.

For mail merging, see John Walkenbach's example. http://spreadsheetpage.com/index.php/tip/mail_merge_without_word/

My mailmerge example attached started off with John's but also allows mail merging to MSWord. It allows either a userform or a dataform method or the standard worksheet method to add/edit/delete data.

shrivallabha
02-08-2011, 10:18 PM
When I began with VBA in Jan 2010, I tried to simulate cases where, it could be implemented. And tried coding. This is one of those.

It was an attempt to replace old dusty register which maintains stationery issuance records. As a matter of fact, the register still rule :)

tepkool01
02-09-2011, 12:48 PM
Perfect, that's what I needed

mdmackillop
02-14-2011, 07:04 AM
Hi Anne.
A simple example


Private Sub Worksheet_Change(ByVal Target As Range)
Dim Tgt As Range, Rng As Range
If Target.Row <> 2 Then Exit Sub
Set Rng = Range("A2:C2")
If Application.CountA(Rng) = 3 Then
Set Tgt = Sheets(2).Cells(Rows.Count, 1).End(xlUp)(2)
Tgt.Resize(, 3).Value = Rng.Value
Rng.ClearContents
Rng(1).Select
End If
End Sub