I have programmed for many years in MS Access using VBA, and I have just recently been hired to create a database in Excel. I recently created a Userform to enter data into a worksheet table, but the validations and editing were being done directly in the worksheet. Your examples have shown me how to retrieve the data and, indirectly, how to edit the same.
Thank you so much, I've been looking for a way to build a search form for a long time. Unlike any other tutorials out there, you actually explain which makes it so much easier . Keep up the good work.
Hi Dan, Great video. I have a question though. Is it possible for a macro to continue through the data set and find other instances of the same non unique input rather than just stop at the first instance? Example, two players have the name. Maybe a loop that goes through a range and can find all the instances of a certain input data?
Thank you for the video from a beginning excel/VBA enthusiast! I do have a question I hope you can help me with. I`ve made a similar UserForm with my own data which I want to lookup the same way as shown in your video. Only in my Combobox I have numbers instead of playernames and this is where I`m stuck! As long as I look up words (e.g. hundred, twohundred, threehundred, etc.) it works fine and I get the results I want, but when I write down actual numbers (e.g. 100, 200, 300) I don`t get any results in my textboxes. I have the feeling I`m missing something very simple but I can`t quite put my finger on it. Thanks for the help.
Thank you. The first time I did this it works. Imported the form into another workbook, and it doesn't work. deleted the form boxes and started from scratch, even deleted and rewrote the code. Any ideas on what may be going on?
Hi gijs berbee there wasn't a spot for respond on your g+ comment. But I think I understand. Oftentimes vlookups get wonky when I comes to numerals. Try in your code to put whatever the entry as having an ampersand and double quotes, which will convert everything to text version. something like: myAnswer = application.worksheetfunction.vlookup(me.cmbNum & "", range("myrange"), 2, 0)
I just found out a way. For those interested, create a Command Button and add all the steps used on this video to the "CommandButton_Click" and add a text box that loads the same information chosen on the combo box (the player name in this case), like: Private Sub CommandButton1_Click() Dim ws As Worksheet Set ws = ThisWorkbook.Sheets("Sheet1") wsLR = ws.Cells(Rows.Count, 1).End(xlUp).Row For x = 2 To wsLR If ws.Cells(x, 1) = Me.CmboxNames Then --------> ws.Cells(x, 1) = Me.txbName
Point to something that's unique. You may want to point to multiple columns combined. You can join them with an ampersand. Example: if me.tbFName & " " & me.tbLName = me.cmbFirstAndLast then 'do stuff End If
Excel 2003 has userforms and a macro recorder. I wonder which parts aren't working for you. I know it was def a quirkier version. Let me know what's not working specifically if you can, maybe we can help.
I have programmed for many years in MS Access using VBA, and I have just recently been hired to create a database in Excel. I recently created a Userform to enter data into a worksheet table, but the validations and editing were being done directly in the worksheet. Your examples have shown me how to retrieve the data and, indirectly, how to edit the same.
Allan Pimble Thank you Allan for such nice words. Glad I could be of some assistance.
Thank you so much, I've been looking for a way to build a search form for a long time. Unlike any other tutorials out there, you actually explain which makes it so much easier . Keep up the good work.
Sean Thanks! So glad it helped!!
Way cool baseball example! Thanks, excelvbaisfun!!
jeepers, thanks!
Hi Dan,
Great video. I have a question though. Is it possible for a macro to continue through the data set and find other instances of the same non unique input rather than just stop at the first instance? Example, two players have the name. Maybe a loop that goes through a range and can find all the instances of a certain input data?
Thank you for the video from a beginning excel/VBA enthusiast!
I do have a question I hope you can help me with. I`ve made a similar UserForm with my own data which I want to lookup the same way as shown in your video. Only in my Combobox I have numbers instead of playernames and this is where I`m stuck! As long as I look up words (e.g. hundred, twohundred, threehundred, etc.) it works fine and I get the results I want, but when I write down actual numbers (e.g. 100, 200, 300) I don`t get any results in my textboxes.
I have the feeling I`m missing something very simple but I can`t quite put my finger on it.
Thanks for the help.
Thank you. The first time I did this it works. Imported the form into another workbook, and it doesn't work. deleted the form boxes and started from scratch, even deleted and rewrote the code. Any ideas on what may be going on?
Hi gijs berbee there wasn't a spot for respond on your g+ comment. But I think I understand. Oftentimes vlookups get wonky when I comes to numerals. Try in your code to put whatever the entry as having an ampersand and double quotes, which will convert everything to text version.
something like:
myAnswer = application.worksheetfunction.vlookup(me.cmbNum & "", range("myrange"), 2, 0)
Hi
How would you do this taking different information from different worksheets within the same workbook?
Thanks so much.
Great video!!
But can you add a command button to update the changes based on the name (row of the name) that's on the comboBox?
I just found out a way. For those interested, create a Command Button and add all the steps used on this video to the "CommandButton_Click" and add a text box that loads the same information chosen on the combo box (the player name in this case), like:
Private Sub CommandButton1_Click()
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets("Sheet1")
wsLR = ws.Cells(Rows.Count, 1).End(xlUp).Row
For x = 2 To wsLR
If ws.Cells(x, 1) = Me.CmboxNames Then
--------> ws.Cells(x, 1) = Me.txbName
Dan my list of names are in 3 columns, first, middle and last. Which column do I point to?
Point to something that's unique. You may want to point to multiple columns combined. You can join them with an ampersand. Example:
if me.tbFName & " " & me.tbLName = me.cmbFirstAndLast then
'do stuff
End If
Hi S', I had a spreadsheet...and I want to add userform but i hav a 2003 excel version and I try to use my macro - I can't make it work or record...
Excel 2003 has userforms and a macro recorder. I wonder which parts aren't working for you. I know it was def a quirkier version. Let me know what's not working specifically if you can, maybe we can help.
Double plus good - comment taken from a movie whose title I forget, but it's still appropriate!
Is that 1984? I can't remember but I think it's some dystopian movie. Haha, thanks John!
Thanks Dan
Thank you krn14242!!