Populate list box with month and year from a date in a user form textbox

mlpeters

New Member
Joined
Sep 30, 2017
Messages
2
Hi,
Im very new to VBA but have tried several different amalgamations of things I have read to get the following result without success. Any help would be greatly appreciated!

I'm trying to set up a macro, so that on clicking a command button on a user form; which enters the collected data into a spreadsheet; it also takes the month name and year from a date entered into a textbox on the userform and populates a listbox on another sheet with this month name and year, as long as this is not a duplicate.

For example: the user has entered "Sunday, 1 October 2017" into textbox1 on userform1.
On clicking commandbutton1, I want "Sunday, 1 October" to be put in Sheet 1, Cell A1. AND I want "October 2017" to be entered into ListBox1 on Sheet2, as long as listbox1 doesn't already contain this item.

Please help!!
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

Forum statistics

Threads
1,215,306
Messages
6,124,160
Members
449,146
Latest member
el_gazar

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