1. 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...
  2. 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...
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. 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, I'm thankful for any help I get both with my VBA education and the...
  11. 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...
  12. L

    VBA variable Userform to Module

    Hi All, I have looked at so many different examples, but I'm not able to relate it back to my code. Here's what I have... I was using an input box, but if the user spells something incorrectly, it could pose an issue... so I decided to use a form with radio buttons. Please provide any...
  13. A

    Creating a Database with UserForm VBA Coding

    Hi all, I am on the verge of completing my project in Excel where users key in data into fields (in user form) and data gets automatically updated into a database sheet. I have added all buttons necessary like text, command, option buttons. Now I am looking at adding a button so that in the...
  14. C

    UserForm with combobox and listbox depending on this

    Hi everyone! I created a userform with a combobox and a listbox. The idea is to choose from the combobox, and depending on the choice, to choose from a specific list in the listbox and use that value later on. So what i have done so far, is the following event with Combobox change: Private...
  15. J

    Using Listbox to alter data in the worksheet

    Good Afternoon everyone. I have a worksheet that monitors peoples favorite snacks, see image. I have a combobox1 in a userform which displays a list of all names. When the user selects a name, the preferred choice of snacks appear in the listbox on the userform. Combobox2 has a list of all...
  16. S


    Hi All, is it possible to post an Excel Userform to a SharePoint or a One Drive, and it open as the Userform? I have tried but it opens the Userform worksheets. Any Ideas? Thank You, Steve
  17. J

    VBA code to allow changes to existing worksheet data

    Morning all, I hop I explain this well enough. I have a worksheet that monitors peoples favourite snacks, see image. I have a combobox1 in a userform which displays a list of all names. When the user selects a name, the preferred choice of snacks appear in the listbox on the userform...
  18. J

    VBA to open a CSV, average data and return the result to textbox in userform

    Hi all, I'm looking to have a button in a userform. Once pressed, allow the user to select a CSV file and open it. The code then needs to take an average of a specified range, for example B2:B14 and report the result in a textbox in the userform. The CSV can then close. Note, the file...
  19. lockarde

    Make userform open at specific cell

    Good morning all, I have a macro that runs when a user double-clicks a cell. Among other things, this macro opens a userform. Is there a way to make the user form open to the right of the double-clicked cell every time? The location of this cell moves down the sheet as the user activates the...
  20. B

    How do I get a userform to refresh information that changed in the spreadsheet when it is reactivated by

    Greetings everyone... Longtime viewer but 1st time poster. Hopefully this will make sense... I have a userform that tracks who gets a project revision when the person the project belongs to is gone (this part works great). In this userform there is another userform that allows me to alter the...

Some videos you may like

This Week's Hot Topics