Userforms and changing list boxes excel 2010

dcden89

New Member
Joined
Jul 28, 2015
Messages
1
I am trying to fill in missing data in a spreadsheet. What I am trying to create is a macro that would populate a userform with listboxes for each blank cell in the row. See example below:
NameZip CodeAgeFav FoodHomeowner
Daniel33706Pizza
Martha27Yes

<tbody>
</tbody>

With the above example, the macro would see that "age" and "homeower" colums are blank in row 1, so a userform would appear to with only those two fields to be entered. For row two, a userform would appear with listboxes for "Zipcode", "Fav Food", and homeowner.

Is this possible? this is what I have tried so far:

Dim x As Object
Set x = UserForm1
x.Controls.Add bstrprogid:="Forms.Textbox.1", Name:="Textbox2", Visible:=True
UserForm1.Show

Dim Table As Range
Dim lastrowa As Variant
lastrowa = Range("A1", Range("A1").End(xlDown)).Rows.Count
Set Table = Range("A2" & ":" & "AP" & lastrowa)


If this is possible, what I would like it to do is scan through each row in the spreadsheet, and show the userform for each blank cell in the row. But I am really struggling with this. Any advice would be appreciated!
 
Last edited:

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Forum statistics

Threads
1,216,060
Messages
6,128,545
Members
449,457
Latest member
ncguzzo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top