HomeОбразованиеRelated VideosMore From: Dinesh Kumar Takyar

How to capture data from userforms into Excel worksheet

424 ratings | 224125 views
Our Excel training videos on YouTube cover formulas, functions and VBA. Useful for beginners as well as advanced learners. New upload every Thursday. For details you can visit our website: http://www.familycomputerclub.com You can capture data from userforms and place it into an Excel worksheet. The process involves creating a userform with the appropriate labels and text boxes and a command button. The command button has the code to transfer the data from the user form onto the worksheet. First we identify the empty row in the Excel worksheet and then the data is transferred cell by cell from the text boxes. The complete process is easy when you think through it and code it step by step. Get the book Excel 2016 Power Programming with VBA: http://amzn.to/2kDP35V If you are from India you can get this book here: http://amzn.to/2jzJGqU
Html code for embedding videos on your blog
Text Comments (179)
SIr, Run time Error Is Occured, Object Require(424)
Dinesh Kumar Takyar (12 days ago)
https://www.exceltrainingvideos.com/capture-data-from-userform-to-excel-worksheet/
yussuf mohamed (22 days ago)
Is there a way I can capture data from an existing MS Access form and store them in Excel worksheet,Anyone?
lorenc bellovoda (4 months ago)
I just created this macro available for a user form. Sub CommandButton2_Click() If TextBox4 = "" Or Text5 = "" Or TextBox6 = "" Or TextBox7 = "" Or TextBox8 = "" Or TextBox9 = "" Or TextBox10 = "" Then If MsgBox("Form is not Completed. Do you want to continue?", vbQuestion + vbYesNo) <> vbYes Then Exit Sub End If End If eRow = Sheet8.Cells(Rows, Count, 2).End(xlUp).Offset(1, 0).Row Cells(eRow, 2) = TextBox9.Text Cells(eRow, 3) = TextBox10.Text Cells(eRow, 4) = TextBox8.Text Cells(eRow, 5) = TextBox7.Text Call ResetForm End Sub Sub ResetForm() TextBox4.Value = "" TextBox5.Value = "" TextBox6.Value = "" TextBox7.Value = "" TextBox8.Value = "" TextBox9.Value = "" TextBox10.Value = "" UserForm1.TextBox9.SetFocus End Sub When I run it i got e massage "Wrong number of arguments or invalid property assignment" and highlighted part "Sheet8.Cells" of code. I want to save data to sheet 8. Could you please help me.
Dinesh Kumar Takyar (4 months ago)
Check your code line-by-line! Is Text5 sames as TextBox5??
Richard Meborg (5 months ago)
Hi I get an error according to the (x1UP)
Dinesh Kumar Takyar (5 months ago)
(x1UP): Use L or l as in London or lamb and not 1 as in one.
Revati Nawghare (6 months ago)
my data is getting added to the last row and not from 2nd row can u pls help me with it.
My data sheet has four colunns, Name, project, Description, Asset number, date and Time. and read machine is capturing the from from the bar codes.
Hie I want to create a user form, so that the bar reader machine, when it read the bar code, the data are moved into the specific cell in the data base.
David Olson (1 year ago)
I am working on an Inspection Project. I am a beginner with VBA programming. I have used many of your videos to create some of my programming needs. I am having several problems. I have a workbook with several sheets titled: Inspection, Corrections, Permit, Subgroups, Item Listing for Subgroups, E (Exterior) Corrections, I (Interior) Corrections. On the Corrections sheet, have buttons that initialize two separate Userforms: Exterior (ExteriorUserform) and Interior (InteriorUserform). I am presently working only on the Exterior one, hoping to copy my work. Each userform has three combo boxes: "Subgroup" (ESubgroupList), "Item" (EItemList) and "Correction" (ECorrectionsList). The combo boxes are intended to cascade depending on the previous one. The Userform also has command buttons: "Record and Clear" and "Close Form." The Selection process for each, except for the first, is base on and advance filter (Criteria range, and Copy to range on the corresponding Worksheets (Item Listing for Subgroups and E Corrections). The Record and Clear button records the correction to the appropriate (open) row and column of the Corrections Sheet. I have attached code. I can send Workbook if needed by email. The Command Close Form button works. The Advanced Filter hangs up. Subsequently there are no entries in Item and Corrections. I cannot get anything to copy to the Corrections sheet. HELP in what ever way possible! Private Sub CommandButton1_Click() Dim Item As Long Dim Correction As Long Dim cboEItemList As Long Set ws = Worksheets("Corrections") Item = Worksheets("Corrections").Range("B" & Rows.Count).End(xlUp).Row Worksheets("Corrections").Cells(Item + 1, "B").Value = cboEItemList.Value Correction = Sheets("Corrections").Range("C" & Rows.Count).End(xlUp).Row Worksheets("Corrections").cell(Correction + 1, "C").Value = cboECorrectionsList.Value cboESubgroupList.Value = "" cboEItemList.Value = "" cboECorrectionsList.Value = "" End Sub Private Sub CommandButton2_Click() Unload Me End Sub Private Sub ExteriorUserform_Initialize() cboESubgroupList.SetFocus cboESubgroupList.Value = "" End Sub Private Sub cboESubgroupList_AfterUpdate() On Error Resume Next Dim ws As Worksheets Dim SubgroupItemList As Range Set ws = Worksheets("Item Listing for Subgroup") cboEItemList.Value = "" cboEItemList.RowSource = "" With ws .Range("CritSubgroup").Cells(2, 1).Value _ = cboESubgroupList.Value .Column("A:B").Advanced Filter _ Action:=xlFilterCopy, _ CriteriaRange:=.Range("CritSubgroup), _ CopyToRange:=.Range("SubgroupItemResult"), _ Unique:=False End With cboEItemList.RowSource = ("SubgroupItemResult") End Sub Private Sub cboEItemList_AfterUpdate() On Error Resume Next Dim ws As Worksheets Dim ECorrectionsResult As Range Set ws = Worksheets("ECorrections") cboECorrectionsList.Value = "" cboECorrectionsList.RowSource = "" With ws .Range("CritItem").Cells(2, 1).Value _ = cboEItemList.Value .Column("B:C").Advanced Filter _ Action:=xlFilterCopy, _ CriteriaRange:=.Range("CritItem), _ CopyToRange:=.Range("ECorrectionsResult"), _ Unique:=False End With cboECorrectionsList.RowSource = ("ECorrectionsResult") End Sub Private Sub ESubgroupList_Change() End Sub Private Sub UserForm_Click() End Sub Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) If CloseMode = 1 Then Else MsgBox "Please use the Close Form button!" Cancel = True End If End Sub
Vinod Bhagat (1 year ago)
Private Sub CommandButton1_Click() eRow.Sheet3.cell(Row.Count, 1).End(xlUp).Offset(1, 0).Row Cells(eRow, 1) = TextBox1.Text Cells(eRow, 2) = TextBox2.Text End Sub for the above code im getting an error.... and error is Runtime 242..object required anybody can suggest me.. how to solve it
Vinod Bhagat (1 year ago)
it works sir...thank you
Dinesh Kumar Takyar (1 year ago)
Check your code again!
Peter Paul tan Paz (1 year ago)
GOT IT WORKING BUT IT STARS AT ROW 7 I DONT KNOW WHY
Peter Paul tan Paz (1 year ago)
tried ur formila its error 1004
Anthony Erdman (1 year ago)
Im getting the exact same issue. OMFG ITS LX NOT 1 X. kill me now
Thank you Sir..I fixed the problem it is not 1x it is Lx
Daniel Zurita (2 years ago)
Vijeesh, I am quickly becoming a Fan. I have recently started using VBA after years of taking a course. I have found your method of showing very easy to follow and with excellent explanations. Keep up the good work.
Iyer Krishnan Rajan (2 years ago)
CAN I GET YOUR CONTACT NUMBER BCOZ I WANT TO CREATE A USERFORM FOR SHIPPING LINE
Iyer Krishnan Rajan (2 years ago)
SIR IM GETTING ERROR AS APPLICATION DEFINED OR OBJECT DEFINED ERROR RUN TIME ERROR:32809 PLEASE HELP ME
Vijeesh Venugopal (2 years ago)
Hello Sir am facing a wiered issue : Please refer to the code below and help me to solve the issue Dim eRow As Long, ws As Worksheet Set ws = Sheets("Sheet1") eRow = ws.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row Cells(eRow, 1).Value = TextBox37.Text Cells(eRow, 2).Value = TextBox36.Text Cells(eRow, 3).Value = ComboBox2.Text Cells(eRow, 4).Value = ComboBox3.Text Problem: I want this data to flowed only to sheet1, but whenever I run the Userform from any other sheets (e.g: Sheet2) my data is getting flowed to Sheet2 instead of sheet1.
Vijeesh Venugopal (2 years ago)
Hello Sir Thanks for your video, It is very helpful, I have one doubt is it possible to Send Username and Password to different Row for Example i want the Username on one row and password in next row (instead of next column)
Vijeesh Venugopal (2 years ago)
This worked for me, am now facing a new problem, as i mentioned in my above comment, I want the information to flowed to only one sheet ( named Database) but the issue is data is flowing to the active sheet, how can i make it to flow only to the sheet i require?
Vijeesh Venugopal (2 years ago)
+Dinesh Kumar Takyar thank you so much sir, I will try and let you know the result
Dinesh Kumar Takyar (2 years ago)
Cells(erow, 1) = TextBox1.Text erow = erow + 1 Cells(erow, 1) = TextBox2.Text and so on...
Vijeesh Venugopal (2 years ago)
+Dinesh Kumar Takyar I am actually trying it for last one week and failed, Am actually trying to develope a Daily Time tracking sheet for my organization, where employee can input 5 different activities at a time to excel database but not in the same row but 5 different row using same command button with one single click.
Dinesh Kumar Takyar (2 years ago)
That's quite easy. Try it yourself!
Rashid Khan (2 years ago)
Make videos in hindi
Krista Beakley (3 years ago)
Thank you for this! I need to make a button that will enter the data into the worksheet, but keep the data populated in the userform so portions can be altered.  I want to be able to enter multiple sets of information with the same data, so I'd like to click the "Enter data" button, but keep everything populated in the form. How could I do that?
ASTRALIND (3 years ago)
thank u so much !! I need ur HELP.....CAN YOU PLEASE TELL ME HOW TO POPULATE SPREADSHEET CONTROL WITH THE REQUIRED DATA FROM MY ACTIVE WORKSHEET ?
Abdullah Ahmed (3 years ago)
thanks for this wonderful video , but i have a problem that it does not go one row down if I add more data !it just add it on the existing data
Anthony LaHee (3 years ago)
Hi thank you very much i am learning to put a form to my business
Julius Laurella (3 years ago)
Can you paste the whole code here?i got debug error
Dinesh Kumar Takyar (3 years ago)
+Julius Laurella http://www.exceltrainingvideos.com/capture-data-from-userform-to-excel-worksheet/
Elliot Dixon (3 years ago)
Perfect - thanks for this.
Timothy Honisett (3 years ago)
Many thanks for this tutorial.  Struggling with this all day and your video, clearly explained, sorted it out for me
Dharvender Singhrawat (3 years ago)
super video so easy method use to teach thaxs a lot... i can understand so easy. 
James Pyle (3 years ago)
For some reason when I run my form, the second item is the default selected text (the password)  How can I control whcih text box is the default that is selected when running the form?
James Pyle (3 years ago)
+Dinesh Kumar Takyar Got it sorted thank you sir!
Dinesh Kumar Takyar (3 years ago)
+James Pyle Have a look here: http://www.exceltrainingvideos.com/focus-on-control-on-excel-user-form/
James Pyle (3 years ago)
I am trying this but I get an error on the first line (the eRow=  line) Oh I put x1 instead of xL  :)  Fixed.
Ashoke Sen Gupta (3 years ago)
Dear sir, I am a big fan of your VBA video clips. Would you please help me regarding the following matters. How can I make a login form having features: admin login(all sheets visible), other (specific sheets visible) and password update features. Also when login form runs workbook should not be seen from behind. Thanks and best regards.
Ayaz Khan (4 years ago)
Sir ......... Very Helpful ..... really its help me lots....... Thanks.
Steven Groves (4 years ago)
OMG finally....IT WORKED!!!!
Anthi Alex (4 years ago)
:((( I have all sorts of problems with my vba programm.. I'm trying to put my data in every 3rd column but it seems to get stuck once it does it the first time.. I want to do this because my cells are actually merged because this is the format of the excell form they have designed. Any ideas? offset(0,3) didn't work for me
Frank Raimondi (4 years ago)
Hi This is what I have,  I am trying to make a userform to enter data into the first free cell and then clear the form.  When I run it it tells me I have an error in the first line  What am I doing wrong  thank you  Private Sub SaveBtn_Click() erow = Sheet1.Cells(Rows.Count, 1).End(x1Up).Offset(1, 0).Row With Sheet1 .Cells(erow, 1) = TextBox1.Text .Cells(erow, 2) = TextBox2.Text TextBox1.Text = "" TextBox2.Text = ""
Frank Raimondi (4 years ago)
Thank you  I now seen where I made the mistake.  I do have another question if you can help. I am trying to make a userform that will fill in the cells in a row but when I click the button to enter the values in the textbox to the cells I want to be able to put a unique number automatically in col "A" that will either increase by 1 each row starting with 1000000.  and then the next A2 will be 1000001 and so on.  I am doing this cause I want to later be able to track that unique number to my inventory, for date and worker and machine.  I would also like to add a letter to the beginning such as A1000001 for shift. A, B, C, D.  Do you have a video for something like this?  Thank you very much
Dinesh Kumar Takyar (4 years ago)
+Frank Raimondi Change End(x1Up) to End(xlUp). It's actually l (ell) and note 1 (one).
VB6 Programming (4 years ago)
Good VBA Programming example
MrLogic 101 (4 years ago)
Hi, I am trying to make a Register and Login form which I have for the most part completed successfully, however I am struggling to add a password confirmation for my Register form for purposes of double entry. Anyone have any idea of how I can do that? ' Register Button code Private Sub cmdRegister_Click() Dim regusr As String Dim regpwd As String regusr = frmRegister.txtUsername regpwd = frmRegister.txtPassword Worksheets("Users").Range("A2") = regusr Worksheets("Users").Range("B2") = regpwd Worksheets("Users").Range("C2") = regusr Sheets("Users").Select Rows("2:2").Select Selection.Insert Shift:=x1down, CopyOrigin:=x1FormatFromLeftOrAbove Sheets("Main Menu").Select MsgBox "Registration Complete" Unload frmRegister End Sub ' Login Button Code Private Sub cmdLogin_Click() Dim strUsername As String Dim strPassword As String Dim usr As Variant Dim pwd As Variant strUsername = txtUsername.Text strPassword = txtPassword.Text usr = Application.VLookup(txtUsername.Text, Range("users"), 2, False) pwd = Application.VLookup(txtPassword.Text, Range("pass"), 2, False) If IsError(usr) = True Then         MsgBox "Error! User does not exist" Else If IsError(usr) = False Then If Application.VLookup(txtUsername.Text, Range("users"), 2, 0) = _ txtPassword.Text Then Sheets("Input").Select MsgBox "Login Successful!" Unload frmLogin Else MsgBox "Incorrect Password!" End If End If End If End Sub
Dinesh Kumar Takyar (4 years ago)
+MrLogic 101 @compare-userform-data-with-worksheet-data/
Mahesh Varma (4 years ago)
how to limit a textbox2 data to a particular cell only ( i mean how to prevent a textbox data from finding new empty cell ) For example i want to create a form with two text boxes textbox 1 will find new cell in A row but i want textbox2 data to be entered only into one cell B2
Mahesh Varma (4 years ago)
+Dinesh Kumar Takyar got it thanks a lot 
Mahesh Varma (4 years ago)
+Dinesh Kumar Takyar Private Sub CommandButton1_Click() Dim erow As Long Dim ws As Worksheet Set ws = Worksheets("sheet1") Range("B2")=textbox2.textcells(erow,1)=textbox1.textwhere erow= ws.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row? Cells(erow, 1) = TextBox1.Text Cells(erow, 2) = TextBox2.Text End Sub I am getting error when using this code 
Dinesh Kumar Takyar (4 years ago)
+Mahesh Varma Range("B2")=textbox2.textcells(erow,1)=textbox1.textwhere erow = ws.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
anna salisbury (4 years ago)
Hi, I am having problems entering the data on empty rows.  The information keeps writing over the existing data. Any ideas?
Undine Duke (4 years ago)
Hi, I have attempted this but currently getting an error "The macros in this project are disabled"  Can you please assist.
Undine Duke (4 years ago)
Ok so it looks like I got the macro problem fixed now I got another error when I tried the user form. "Runtime error 1004" Application defined or Object defined error.  I think I may have an idea what caused the error, but can you assist please.
Katherine Madrid (4 years ago)
I continue getting an error and asked to debug the "erow" Formula on my userform. I a using Excel 2007 is there a different code for this version?
Katherine Madrid (4 years ago)
+Dinesh Kumar Takyar Thank you! I got it! (: Im new to all this visual basic stuff so this was a great exercise and a really good video I look forward to watching others.
Dinesh Kumar Takyar (4 years ago)
Maybe you're writing end(x1Up): 1 as in one and not l as in L. 
matt G (4 years ago)
Im looking for support on a similar issue plus more, don't mind paying a bit towards it but dont seem to see many places where you can send attachment and receive support. Any ideas? 
Dinesh Kumar Takyar (4 years ago)
http://www.exceltrainingvideos.com
Siddhartha Ray (4 years ago)
Dear sir, It was nice going through your videos. I maintain my patient data on excel work book with multiple sheets. Learning from your video i have designed a user form to input my patient registration data like date, First, Middle & Last name Age , Gender address in 4 columns and contact nos & email id.  The form works fine and data is being put into the required cells but when a diffrent sheet is open the data is being put into that sheet. I want to define the specific sheet so that when data is submitted from the user form it goes to the specified sheet (in this case it is "New Registration) not into the other sheet which is open. Can you please advice what to do. Thanks in advance Dr.S.S,Ray
Aryan Kumar (2 months ago)
Bbfk
rojane83 (4 years ago)
I've got error on Set ws = Worksheets("Sheet1") when I click debug the error says: Run time error '9' Subscript out of range
Dinesh Kumar Takyar (4 years ago)
You are trying to access a worksheet that doesn't exist!
Gurpreet Singh (4 years ago)
sir , i need your help for customer function
Sabharish Lakshmipathy (4 years ago)
great sir,  i have a query now . i want to capture data from a listbox , how to do it can u please explain .
Vasin Douglas (4 years ago)
Brilliant!
Yuvi Lav (4 years ago)
Hi there, How do I create a macro to pull information from outlook emails and insert them into excel. We have a website that customers enter their email address, name, surname, company name and admins name. All that info gets sent to my inbox with the relevant Form Data. All emails are the same except the information they input differ. I want to pull that information and insert it into excel in the following columns Company name I name I surname I email address I administrator I want all new data to be inserted in a new row in the same excel workbook. How do I go about using a macro to d this. Please help.
Artemio Romero Jr (5 years ago)
How did you make the second name and password to come out below the first name and password automatically? 
Aditya Bhardwaj (5 years ago)
im doing a data entry project .. text details have to be entered into VB and then saved into excel sheet.. details to be saved.. Name  vehicle no    type   time  cost... how do i link an excel file and when we enter the details how can they be saved and i would like to create a list of 100 vehicles i.e. 100 rows to be saved one after one
Adrian Dondokambey (5 years ago)
How about this: I am having a data already enter in excel sheet1 and I want to modify some of them let say in E9, I want that after I select any column in row 9 (let say A9) and than I will click 'command_button' to display the userform1 which will show the current textbox1 value in E9, edit it and insert again to E9 by click an 'Insert_button". This should be repeat if I select any other column in row 10 let say E10, and again the textbox1 of userform1 should display the value of E10 and I will edit and insert and so........I guest you understand what I mean. and I would appreciate if u can help me...Thanks in advance..:)  
gazerstrike (5 years ago)
How about a login form sir? Can you give me a link into a video of yours that actually teaches on how to use those data I have in my excel spreadsheet for my login form?
Dinesh Kumar Takyar (5 years ago)
Here are the links: http://www.familycomputerclub.com/excel-training-videos/how-to-capture-data-from-user-form-to-excel-worksheet.html http://www.familycomputerclub.com/excel-training-videos/login-verification-in-excel.html
Dinesh Kumar Takyar (5 years ago)
Create 2 user-forms - one for registration and the second for login. In the first form you capture or transfer the data (username and password) from the user-form to your Excel worksheet. In the second login form the user logs in and you compare the username and password with the earlier captured data using a looping process. Many videos available at familycomputerclubdotcom.
Harshavardhan Jangala (5 years ago)
yes sir i could identify the problem and rectified it. And sir i would like to create multiple login ID & password. Please help me
Dinesh Kumar Takyar (5 years ago)
Does any specific line of code get highlighted?
Harshavardhan Jangala (5 years ago)
Sir Please Help me after enterring the data when i press the command button im getting the error: runtime error '1004': stating application-defined or object-defined error
Dinesh Kumar Takyar (5 years ago)
You can watch my videos at familycomputerclubdotcom. Replace 'dot' with '.'
Mohammad Ahmed (5 years ago)
sir i need your help to create customer ledger in excel + VB would you give my guide line although i am a beginner in vb.
Sayyed Noormohammed (5 years ago)
Thanks you i found my query
Talal Alwaheeb (5 years ago)
Thank you I find the mistake
Talal Alwaheeb (5 years ago)
All so, I have same problem
Dinesh Kumar Takyar (5 years ago)
The code works fine. I notice that you have changed the name of the command button. Is your code truly attached to this button? Also check the name of your worksheet.
Vincent Lin (5 years ago)
I am using Office 2007 in win7, VB 6.5 Private Sub CaptureData() Dim erow As Integer erow = Sheets("Input").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row Sheets("Input").Cells(erow, 1).Value = TextBox1.Text Sheets("Input").Cells(erow, 2).Value = TextBox2.Text End Sub ---------------------------------- I got run time error 424 at line : Cells (erow,1) =... Can you kindly help>
Dinesh Kumar Takyar (5 years ago)
Did you declare erow like: dim erow as integer or dim erow as long?
Ceaser Leo (5 years ago)
well i have tried this tactic and it does not work for me, my first free row begins on row 7 and i have several columns in my work sheet, when i debug the line with eRow = is highlighted
Ravindra Kumar Karanam (5 years ago)
Yes..Now i am able to note the code and it is fine.
Dinesh Kumar Takyar (5 years ago)
Sometimes if your internet connection is slow you may face such a problem on YouTube. Why don't you visit my website familycomputerclubdotcom?
Ravindra Kumar Karanam (5 years ago)
video is useful for beginners but code is not clear to note.If it is good,that will be good.
Dinesh Kumar Takyar (5 years ago)
Watch the related videos.
Dinesh Kumar Takyar (5 years ago)
Visit my website and do custom search. Kindly change your picture. Thanks.
yussuf mohamed (22 days ago)
Thank you sir for your informative videos. Am using an MS access form for data input, Is there a way I can capture that data into an excel worksheet?
Syed Pervez Rizvi (5 years ago)
I want log some variables data in cells 1,2,3 and time with command button pressed in VB 6 is it possible.
Rajiv Reshamia (5 years ago)
Dear Sir , I had created user form which calculate IT interest. i want that is exported in pdf with the financial year and after export the user form will closed automatically can you help with the coding Rajiv
Major Matsuki (5 years ago)
Please Reply What if like the form or application is in another computer will it still be saved in the excel?
Dinesh Kumar Takyar (5 years ago)
Add this line of code: UserForm1.Hide View details here: familycomputerclub-dot-com/coding-quit-command-button-on-excel-userform-to-display-message-dot-html Replace the two -dot- with .
Rajiv Reshamia (5 years ago)
Dear Sir , I had created user form which calculate IT interest. i want that is exported in excel with the financial year and after export the user form will closed automatically can you help with the coding Rajiv
Dinesh Kumar Takyar (5 years ago)
Sure. I've uploaded many such videos dealing with this situation,
Jaymes Moynihan (5 years ago)
when i enter the user name and password it saves the information, but i have to delete them to add another, im wondering if i can attach a loop so the program runs again so i can enter new data without having to delete characters i previously typed in
Dinesh Kumar Takyar (5 years ago)
You can add a line of code after the macro name: Dim EROW as Long
mophdkhaidin (5 years ago)
sir, why is this happen?? EROW = Sheet1.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row Cells(EROW, 1).Value = TextBoxDate.Text then msg box pop up : complie error variable not defined
Dinesh Kumar Takyar (5 years ago)
I didn't get the question. Could you please specify?
Jaymes Moynihan (5 years ago)
im studying VBA for the first time in a week long crash course, this video has really helped me understand creating data capture forms, thank you sir, my only question is, can i attach a loop to that form?, so when you input the information it loops with new empty boxes?
churchill378 (5 years ago)
this is very very easy I made a basic video to show you how. just goto my channel to view and pause video on the code.
Dinesh Kumar Takyar (5 years ago)
Just access Worksheets("Sheet2") after copying and before pasting.
mophdkhaidin (5 years ago)
good day sir, i am having a problem here. I can capture data into the sheet1. But I want to capture another data using the same button into sheet2. e.x : name and phone number into sheet 1 car no and time use into sheet 2. can you solve my problem please
Dinesh Kumar Takyar (5 years ago)
Check out the latest video on Error Handling.
Dinesh Kumar Takyar (5 years ago)
If you are working in one sheet and your data goes to another sheet then you need to select the sheet where the eRow is located and the data is going to be transferred.
Joy Hampton (5 years ago)
I've tried this and it worked initially. I tried to replicate it and now it won't work. It repeats on the same line instead of going to the next line. eRow = Sheets("Reqs").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row Cells(eRow, 2) = REQ_TXTBX_REQNUM.Text
Dinesh Kumar Takyar (5 years ago)
If you are working in Excel 2010 you may need to declare the variable explicitly. For example, if you are going to use an integer variable x, then you need to define it before using it like: Dim x as integer. Hope this helps.
Dave Godinho (5 years ago)
I found the problem with that error. It was L, not 1. Sorry. My new error is asking for the declared variables. Did you do that somewhere else? Because I don't see it under the "CommandButton1" code.
Dinesh Kumar Takyar (5 years ago)
Did you type [x1UP] as in 'xoneUp' or xlUp as in xLUp? It's not 1 (one) but l (L). Hope this helps sort out the problem.
Dave Godinho (5 years ago)
Im getting an error on [x1UP]. Can you help please? I already have data in the sheet. I just want users to be able to add more using the form
Lithskin13 (5 years ago)
THANK YOU SO MUCH.....I WAS LOOKING EVERYWHERE FOR THIS. I was using "ComboBox1.value" istead of "ComboBox1.text" I was looking all over stupid forums until I decided to come to youtube, thanks again
Vivek Sharma (5 years ago)
Sir, I have a database where customer's data is updated on regular basis e.g. visits/calls done against particular customer. I need to keep the record for each attempt i.e. call/visit/email sent to customer. These updates are being captured in different cells with corresponding dates. NOW MY REQUIREMNET IS " I want one particular cell to capture the latest update with date and type of activity so that when I want to know latest status of the case I don't need to scroll down from all updates.
ruksudaporn wutthikarn (5 years ago)
I use VB 2010
ruksudaporn wutthikarn (5 years ago)
I type Sheet1 and it error what should I change ?
Dinesh Kumar Takyar (5 years ago)
Spammer!
Dinesh Kumar Takyar (5 years ago)
Spammer!
Kamal Purohit (5 years ago)
Thanks, very useful video. It is very helpful for excel learners.
Alex Thomas (5 years ago)
Great video sir very helpful, Can you tell how we can reset.
Dinesh Kumar Takyar (5 years ago)
Select File from the Ribbon, click on options, click on Customize Ribbon. On the right hand side under the Customize Ribbon, sub heading main tabs look for 'developer' click on the check-box and finally OK.
Deependra Vikram (5 years ago)
Brilliant videos however it would be much appreciated if the Videos follow an ordered and systematic naming terminology... It is difficult to browse the next video to watch in the corresponding series... Kindly look into it!!!
Md. Sahadate Hossan (5 years ago)
Awesome footage. There is so many of ways to earn cash online. Clouded Cash Cow has been making my friend over $2,225 every week for the past 2 years. Discover exactly how you can too. Search Google for Clouded Cash Cow :)

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.