'Object Required' error Trying To Populate Textbox In One Userform With The Selected Value From Listbox in Second Userform (Xposted)


Well-known Member
I have hit a roadblock in the progress of my VBA project. I am reaching out to a second group of pros to see if perhaps they have a solution after having limited success where I had originally posted my question.

I have two open userforms. userform1 (uf3_group_1) has a textbox (textbox1) in which I am trying to populate from the listbox (miss_rn) selection from userform2 (miss_rn).

I am failing with this line in the initialization code of userform1.
TextBox1.Value = test_mr.miss_rn.ListIndex
This attempt also failed.
TextBox1.Value = test_mr.miss_rn.List(.ListIndex, 1)
I am getting an "Object required." error.

My Aswer Is This

Well-known Member
If like you said it would be part of the initialize code when Userform 1 is opened it would need to look something like this.

Private Sub UserForm_Initialize()
'Modified  5/12/2019  7:58:14 PM  EDT
TextBox1.Value = UserForm2.ListBox1.Value
End Sub
This assumes Userform with listbox is open and some value in the listbox is selected.
Last edited:


Well-known Member
Thanks so much My Answer Is This for your suggestion. Regrettably, I'm still getting an "Object required." error with that line.

My Aswer Is This

Well-known Member
I assume you know I used default names for the two UserForms
You will need to modify to your needs.
And modify the listbox name to your needs
And the Textbox name

How are you opening these Userforms.

Show me the entire code your using to open both of these Userforms.
Last edited:

My Aswer Is This

Well-known Member
I'm just curious. Why do you need more then one UserForm?

I have used UserForms for years and never needed more then One.

Do you know about UserForm Multipages

My Aswer Is This

Well-known Member
I see now the other posting. Now this sounds like the two UserForms are not both in the same Workbook. I see no mention of this in this post. I may have helped on this prior myself I loose track sometimes.
Note RoryA and myself also spent a fair bit of time on this issue at this MrExcel thread as well.

My Aswer Is This

Well-known Member
I have not tested this.
But if your two Userforms are on different Workbooks then I would say you would need to refer to the workbook also

Something like Workbooks("Jane.xlsm").UserForm1.TextBox1.value=Workbooks("Paul.xlsm").UserForm3.Listbox1.value

And both Workbooks would need to be open.


Well-known Member
Maybe send the desired value from userform2 to a cell in the workbook that has userform1 and then have the textbox in userform1 reference that cell in its own workbook. Would be a lot easier then trying to reference a control I would imagine.

Note this has been cross-posted here
Last edited:


Well-known Member
The reason for so many userforms ... this is not one application. The main application relies of upwards of 3 different workbooks that hold dynamic data day by day. Each workbook has its own set of forms that allow users to access and manipulate data unique to that database. This allows data to be worked on by users without tieing up access to the others. I can have users working on each database independently at the same time. With one workbook and with one userform, I can't allow multiple users to work with their assigned data.

The main application ties all these unique and sometimes independent workbooks together. This master application, I am trying anyway, has access to the other workbooks userforms so that data can be accessed and manipulated from within.

For example, one large database (workbook) is comprised of customer information. It has it's own forms unique to entering and manipulating data specific to customer information. Another workbook holds information specific to facility rentals and has no reliance on the customer data. It has it's unique forms. I can have two users working on each of these workbooks at the same time, whereas if it was one workbook, only one could be working on it at any given time.

A third, and master application, ties the data from both the customer data and the facility rental data workbooks to create a specific document. There are times when working with this main application, data from the other workbooks is missing or incomplete as identified by the application. (eg encounters a missing customer record) When this happens, the idea is to be able to access that specific workbook's (customer) forms (using base data from the main application) to edit/enter that information. If the main application encounters missing data related to the customer, the user of the main application can edit this information throuhgh the customer workbook with the same userform that one would use when working with the customer workbook independently. It simply saves me having to recreate the same userform in the main application. The missing data is then maintained in the customer workbook, and made available in the master application as a result.

Yes ... the data is interdependent, and I'm trying to establish access to all through one master application without having to recreate userforms. The databases are fairly large, so trying to maintain them all in one workbook makes for a large slow file, as well as removes the ability to work on different databases independently.

I think the easiest solution is to assign the value to a cell and access the cell rather than the object.

Some videos you may like

This Week's Hot Topics

  • Importing multiple excel files into one spreadsheet
    Hi, I'm trying to import multiple excel files (with the same format into a single spreadsheet) so that each day's file is listed underneath the...
  • find many based on a certain criteria
    good evening, I hope someone can help me? I have a workbook sheet 2 contains lots of data.... I would like to be able to find anything on sheet...
  • How to copy multiple rows using If
    Hi all, I'm very new to VBA and have written this simple code to copy certain cells if a certain cell within that row contains any data. I need...
  • VBA If statement
    Dear All, I have two dates, where I'd like a message box to pop, if the dates are between this criteria. [CODE] sDate1 = #10/1/2019#...
  • Text Format
    I have a sheet for user to keyin the data. The format of the data can be 451 / 1903, 0012 / 9908 or 00287 / 0099. The number after the "/" is...
  • Syntax errors
    Good Morning, Trying to compile a workbook, I keep getting a few errors. Here are the first two: [code=rich]Syntax Error: Function...