![]() |
Setup Userform
I have a Userform with 2 comboboxes (date and month), 4
checkboxes and 4 textboxes. Depending on the selection of the 4 checkboxes I want to the 4 textboxes to represent text (or not). In total there are 14 posibilities of what needs to be shown. How can I program with a VBA routine whether the textboxes need to show a certain text, depending on whether the checkboxes are true or false? I want to prevent loads of if .. then structures like: "If checkbox1 = true then If checkbox2 = true then If checkbox3 = true then ..... textBox1.Text = "Text1" Else......" 1) Are boolean variables to check state of checkboxes easier to use to get textboxes to represent text (or not)? 2) How can I get default text of comboboxes to be shown in Textbox? If I have on Userform_Initialize(): combobox1.Value = Format(Ayer, "d") combobox2.Value = Format(Ayer, "mmm") and textbox1.Text = combobox1.Value Then on showing the userform, only the combobox values are shown with dates, but not the textboxes. Thanks in advance Martin Yours sincerely Martin |
All times are GMT +1. The time now is 03:53 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com