Textbox shows days by combobox

asyamonique

Well-known Member
Joined
Jan 29, 2008
Messages
1,286
Office Version
  1. 2013
Platform
  1. Windows
Code:
Private Sub ComboBox1_Change()Me.TextBox10.Text = Format(ComboBox1, "mmm")
End Sub

Hello,
Could you please help me on above code?
What would be the alteration if the Combobox shows the months and selected by any of month and the Textbox will show the first day of that month as in day(Wed)
Thanks
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
What are you loading into your combobox?
Are you loading 1 then 2 and then 3 etc.?

I noticed you also made a posting asking about the same thing but dealing with label.

I think you should ask your entire question in same posting
 
Last edited:
Upvote 0
Code:
Dim Months As LongFor Months = 1 To 12
Me.ComboBox1.AddItem Format(DateSerial(2000, Months, 1), "MMMM")
Next Months

Hi,
That code populating the combo as months.
So I Hhave 31 labels on userform.
If the combo selected with any month the labes will fill with day.
If the combo selected as March
Label1 will be Thu
Label2 will be Fri
Hope its clear.
Many thanks.
 
Last edited:
Upvote 0
This loads the Months into the Combobox but does not tell us what year we are dealing with.
January 1 2018 may be Monday but January 1 2019 may be Friday.
Unless you live in a country that does things differently.
 
Upvote 0
You need to explain in full what you want, In one posting you wanted to load names like Mon Tues Wed
Into your 31 labels

Then I believe you wanted the days like 1 2 3 4 loaded into 31 textbox

And all this was to work using a selected month selected in a combobox

The problem was you asked one question in one posting and another part of your request in a different posting

So please explain if this is what you want and is their more to what you want. And how would we know what year we are working with.

Ad your labels and Textboxes need to be named Label1 Label2 ect. And Textboxes need to be named Textbox1 then Textbox2 etc.

And your combobox should be named Combobox1
 
Upvote 0

Forum statistics

Threads
1,224,825
Messages
6,181,190
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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