userform

  1. L

    Pass data from a userform to a variable within a macro

    Hi! I'm working on a macro which graphs columns selected with an input box, and I'm trying to change these input boxes to userforms (in order to decrease the amount of popups for the user). However, I'm unsure of how to assign cells selected in a userform to variables which can be used in a...
  2. B

    Dynamically Create and Fill Value of Userform Textbox in VBA

    Hi Community, I am stuck in a VBA conundrum. I am trying to create multiple UserForm Textboxes in vba and Fill each one with a unique value either by index, or by some other means. I am able to get them to fill but when I do it seems that all the text boxes are being filled with the same values...
  3. M

    UserForm not finding multiple entries

    I was looking for a code that will help me look for multiple/dupes in a worksheet when entering information from a userform. I struggled with this and searched google high and low and used the code: If IsError (Application.Match (Me.NameTextBox, Worksheets("Admin").Columns(3),0)) Then MsgBox...
  4. R

    Auto generating invoice number based on invoice number on last row

    So, I have a userform and a database file, the format of the invoice numbers(which act like unique serial numbers) in the database goes like 001/2020, 002/2020, 003/2020 and so on. With the help of Userform_Initialize, I am auto populating the invoice field in my userform. So if last invoice is...
  5. A

    VBA, Userform, Search Function show result for Referance number in text box, would this to also select corisponding row in list box.

    Hi all, Fairly new to VBA. I have a userform that allows you to enter Clients Information into text boxes and add this data to a table in excel. You can then search by Customer Reference no. to show results in textbox they were entered to update etc. I also have a list box that shows all...
  6. lockarde

    Hide a Userform when clicking outside the userform?

    Hello All, I have a simple userform that pops up and shows a quantity breakdown of categories in a worksheet. I was wondering if there is a way to make the userform close simply by clicking away from it, similar to what would happen if a pop-up appeared on a webpage. It certainly isn't a...
  7. Y

    Populate userform textboxes and comboboxes

    Hi all, Hope you can help me with below issue. Thank you in advance. Context I have a userform that requests the name of an entity. Once the name is entered the user can choose to collect data (if any). To do so I have created a button. Once clicked the idea is that other elements in the...
  8. C

    Userform Data Mismatch issues

    I Have created a user form that auto populate fields 2-11 with data from the range on sheet1 ("Data12"). all of this is based on the Serial number inputted into form field number #1 which is a dropdown list that uses the range in colum 1 of the sheet which holds all the other data the only...
  9. P

    Change column in multi-column listbox

    Hi. Not sure this is possible, but here goes: I have a multi-column multi-select listbox. It's populated from a dynamic range on a sheet (width of the range does not change but number of rows does). The listbox is on a userform with a submit button that write values from the form to another...
  10. Q

    Creating Change Events on Dynamically Created Textboxes

    Hello all, I hope this finds you all healthy and safe! I have a Userform where I have populated some textboxes in Design and others dynamically. For the textboxes that I have created dynamically, I need to populate the Change event with code to run a routine in a module. I'm creating the...
  11. D

    Userform Listbox Not Returning Selected Value (.Text)

    Hi all, I have a Userform with two Listboxes and two Labels on it. Both Listboxes are populated in the Initialize procedure and one item is selected in each as a default when the user launches the Userform. I would like the Label1 to show the item selected in the Listbox1 and Label2 to show...
  12. D

    Find missing checkboxes in userform

    hi all, The following code showing my userform contains approx. 170 checkboxes. Sub macro1() Dim ctl As Control Dim j As Long 'Dim msg As String j = 3 For Each ctl In UserForm1.Controls If TypeOf ctl Is MSForms.CheckBox Then If UserForm1.Controls(ctl.Name).Value = False Then Cells(j, 5).Value...
  13. P

    Populate a Userform Caption using a Named Range

    Hi All, I'm new to VBA so hope this question isn't too dumb! I'd like to add a "Key" to a user form that can dynamically update should it need to. Currently the user form has a number of comboboxes which have shortened codes in them to make entering the data faster, and so the resultant...
  14. Z

    VBA - Userform - dataform into excel attachment

    Hi all, Wandering if anyone can point me in the right direction. I created a vb userform for people to input data. It is basically a bunch of fields, then the vba macro will create an email with some pre-defined settings, and then put the data in the email as a table and then send to...
  15. C

    Setfocus from inside of Frame

    Quick question... I am trying to set focus to a CMD button outside of a frame from a text box inside the frame. I get an error msg "Run-time error..... "Unexpected call to method or property. I have tried the setfocus …. frmlvecalc.cmdAdd2.SetFocus and me.cmdadd2.setfocus. Is there...
  16. G

    Userform Textbox.Text - Covert to dd/mm/yyyy when adding record to worksheet

    Hi All, I'm setting up a simple userform which does what I need apart from the date textbox updating the worksheet with the wrong format. This is what I have at the moment to update the worksheet with a new record, I cant figure out how to change the format dd/mm/yyyy to the txtDueDate...
  17. E

    Remove Table Row From Userform

    I have made a userform for deleting a row of data. Is it possible when i delete a row of data, the only row affected is the table row, while the same row outside the table is not deleted? For example, if want to remove Bill, test1, and 345, is it possible to make the data1 still remain there...
  18. E

    Userform cannot be run from different sheet

    I have this userform code that cannot be executed from other sheet, so it can only be executed from sheet 6 (Activity Data). When i tried to execute it from other sheet, it shows runtime error 1004: application-defined or object-defined error. Any idea how to solve this problem? Private Sub...
  19. M

    Userform textbox validation - private sub doesn't fire on tab exit

    Hello, I have a problem that probably won't matter at all but it is bothering me and I'm hoping someone can help. I"m a novice at VBA, but understand enough to adapt what I find and make it work for me, mostly...so I'm thankful for any help I get both with my VBA education and the...
  20. D

    Scroll when inside "dropdown area" of combobox, not just main object - userform

    I have found much help in this forum but I'm lacking the last dot of the "i". I've come across 2 different approaches to getting mousewheel scroll inside a userform. Both written by @Jaafar Tribak These are: [Alt.1] – Scroll any control [Alt.2] – Scroll ListBoxes With [Alt.1] scrolling inside...

Some videos you may like

This Week's Hot Topics

Top