-
Mar 14th, 2020, 11:26 AM
#1
Thread Starter
Lively Member
HELP! CHANGE THE COMBOBOX.TEXT ACCORDING THE DAY of week
Hello everybody!
i need your help for a code to change a combobox.text according the day.In my situation, i want to change only the Saturday and Sunday.
I am beginner in coding and i didn't find any clues on the web or i don't have enough knowledge.thank you in advance for your answer.
-
Mar 14th, 2020, 11:35 AM
#2
Re: HELP! CHANGE THE COMBOBOX.TEXT ACCORDING THE DAY of week
Please provide a FULL and CLEAR explanation of what you're trying to achieve. What you have posted makes little sense.
-
Mar 14th, 2020, 11:40 AM
#3
Thread Starter
Lively Member
Re: HELP! CHANGE THE COMBOBOX.TEXT ACCORDING THE DAY of week
ok! i want to change the text from a combobox the saturday and sunday !
for example:
my combobox1.text= "fighters"
my goal is only the saturday and sunday combobox1.text= "champion"
thank you for your solution!
-
Mar 14th, 2020, 11:54 AM
#4
Re: HELP! CHANGE THE COMBOBOX.TEXT ACCORDING THE DAY of week
It would seem to me that the actual question you want answered is how to determine whether the current day is a Saturday or Sunday, because you presumably know how to set a property, whether it's the Text of a ComboBox or anything else. Is that correct? If so, why didn't you ask that question? If not, what is the question you want answered?
-
Mar 14th, 2020, 04:21 PM
#5
Thread Starter
Lively Member
Re: HELP! CHANGE THE COMBOBOX.TEXT ACCORDING THE DAY of week
Originally Posted by jmcilhinney
It would seem to me that the actual question you want answered is how to determine whether the current day is a Saturday or Sunday, because you presumably know how to set a property, whether it's the Text of a ComboBox or anything else. Is that correct? If so, why didn't you ask that question? If not, what is the question you want answered?
yes,you are right! how determine the day of week. i need a code. i am beginner to build program and i need some help and explications. this forum helped me a lot! i am grateful!
-
Mar 14th, 2020, 04:25 PM
#6
Thread Starter
Lively Member
Re: HELP! CHANGE THE COMBOBOX.TEXT ACCORDING THE DAY of week
Last edited by danzey; Mar 14th, 2020 at 04:29 PM.
-
Mar 14th, 2020, 08:17 PM
#7
Re: HELP! CHANGE THE COMBOBOX.TEXT ACCORDING THE DAY of week
Code:
If (Now.DayOfWeek.ToString = "Saturday") Then
-
Mar 14th, 2020, 09:19 PM
#8
Re: HELP! CHANGE THE COMBOBOX.TEXT ACCORDING THE DAY of week
Originally Posted by wes4dbt
Code:
If (Now.DayOfWeek.ToString = "Saturday") Then
Don't convert things to Strings unless you need a String, which you don't in this case. What type is that DayOfWeek property? Use that type:
vb.net Code:
If Date.Now.DayOfWeek = DayOfWeek.Saturday Then
-
Mar 14th, 2020, 09:28 PM
#9
Re: HELP! CHANGE THE COMBOBOX.TEXT ACCORDING THE DAY of week
Don't convert things to Strings unless you need a String
That sounds a lot like an ORDER. Now I will have to go out of way to convert everything I can to a String.
-
Mar 14th, 2020, 09:53 PM
#10
Re: HELP! CHANGE THE COMBOBOX.TEXT ACCORDING THE DAY of week
Originally Posted by wes4dbt
That sounds a lot like an ORDER. Now I will have to go out of way to convert everything I can to a String.
Clearly my reverse psychology is working.
-
Mar 15th, 2020, 07:43 AM
#11
Thread Starter
Lively Member
Re: HELP! CHANGE THE COMBOBOX.TEXT ACCORDING THE DAY of week
thank you so much! have a nice day!
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|