Sir,
Will you please help me in providing User Form Entry Screen samples in excel ...
Thanks
Jigyansha
Data Entry Form
-
- Administrator
- Posts: 78647
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Data Entry Form
It would be beyond the scope of this forum to write all the code for a userform for you, but if you have specific questions we will be happy to help you.
Best wishes,
Hans
Hans
-
- StarLounger
- Posts: 77
- Joined: 15 Jan 2011, 02:32
Re: Data Entry Form
Sir,
Will you please guide me in showing a few code not complete ... So that I'll try the rest ....
Regards
Jigyansha
Will you please guide me in showing a few code not complete ... So that I'll try the rest ....
Regards
Jigyansha
-
- Administrator
- Posts: 78647
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
-
- StarLounger
- Posts: 77
- Joined: 15 Jan 2011, 02:32
Re: Data Entry Form
Sir,
I need a macro which shall only add records one by one. A few sample datas are also given. When the next record added it shall place at the end of the previos record. Different columns are there in the excel sheet, like wise datas are to be placed / punched through this user form. In that attached excel sheet I have only created list box, command button and so on. But as I am not acquianted with VB, I am not able to do it. Sir, Pl. do the entry portion only, no need to spend valuable time in doing Edit & Find portion. Part-1 & Part-2 of the screen are only required for storing data. If values are punched in the user form they shall be reflected in their corresponding excel cells. It will be a great help towards me if you will provide me one sample.
Regards
Jigyansha
I need a macro which shall only add records one by one. A few sample datas are also given. When the next record added it shall place at the end of the previos record. Different columns are there in the excel sheet, like wise datas are to be placed / punched through this user form. In that attached excel sheet I have only created list box, command button and so on. But as I am not acquianted with VB, I am not able to do it. Sir, Pl. do the entry portion only, no need to spend valuable time in doing Edit & Find portion. Part-1 & Part-2 of the screen are only required for storing data. If values are punched in the user form they shall be reflected in their corresponding excel cells. It will be a great help towards me if you will provide me one sample.
Regards
Jigyansha
-
- Administrator
- Posts: 78647
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Data Entry Form
Here is part of the code for the Add Records button (CommandButton1); you'll have to complete it yourself:
Remark: it would be better to give the controls on the userform meaningful names. For example, you could rename CommandButton1 to cmdAddRecord, TextBox1 to txtDemandDt, TextBox24 to txtBran, etc. This would make the code more readable:
When you read this version, it is clear what the controls are used for.
Code: Select all
Private Sub CommandButton1_Click()
Dim r As Long
If Not IsDate(Me.TextBox1) Then
Me.TextBox1.SetFocus
MsgBox "Please enter a valid date.", vbExclamation
Exit Sub
End If
r = Range("A" & Rows.Count).End(xlUp).Row + 1
Range("A" & r) = CDate(Me.TextBox1) ' use CDate for date values
Range("B" & r) = Me.TextBox24
Range("C" & r) = Me.TextBox25
' and so on, until
Range("AC" & r) = Me.TextBox23
End Sub
Code: Select all
Private Sub cmdAddRecords_Click()
Dim r As Long
If Not IsDate(Me.txtDemandDt) Then
Me.txtDemandDt.SetFocus
MsgBox "Please enter a valid date.", vbExclamation
Exit Sub
End If
r = Range("A" & Rows.Count).End(xlUp).Row + 1
Range("A" & r) = CDate(Me.txtDemandDt) ' use CDate for date values
Range("B" & r) = Me.txtBran
...
...
Best wishes,
Hans
Hans
-
- StarLounger
- Posts: 77
- Joined: 15 Jan 2011, 02:32
Re: Data Entry Form
Thanks for spending so much time with me.... May I know Sir, Where are you exactly from ?
-
- Administrator
- Posts: 78647
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Data Entry Form
As you can see below my user picture, I'm from The Netherlands (also known as Holland).
Best wishes,
Hans
Hans
-
- NewLounger
- Posts: 3
- Joined: 09 Jun 2010, 19:39
- Location: USA
Re: Data Entry Form
Hello Jigyansha - Have you tried a simple Data>Form for a solution? Do you have a sample file to upload? VB may not be needed.
-
- SilverLounger
- Posts: 1952
- Joined: 26 Jan 2010, 12:46
- Location: Nr. Heathrow Airport
Re: Data Entry Form
Hi JigyanshaJIGYANSHA1985 wrote:Sir,
Will you please help me in providing User Form Entry Screen samples in excel ...
Thanks
Jigyansha
Although I still have to ask loads of questions here I found that by downloading the example workbook found here http://www.exceltip.com/st/Create_User_ ... l/629.html" onclick="window.open(this.href);return false; and reading the instructions helped a lot. If you Google you can find many examples but try the Contextures website as there are some other good examples there
Steve
http://www.freightpro-uk.com" onclick="window.open(this.href);return false;
“Tell me and I forget, teach me and I may remember, involve me and I learn.”
― Benjamin Franklin
http://www.freightpro-uk.com" onclick="window.open(this.href);return false;
“Tell me and I forget, teach me and I may remember, involve me and I learn.”
― Benjamin Franklin
-
- StarLounger
- Posts: 77
- Joined: 15 Jan 2011, 02:32
Re: Data Entry Form
Thanks Sir ...