TEXTKETTE in VBA
15.01.2023 11:44:04
Fatih
String2 = TextBoxJahr.Value
String3 = ComboBoxKW.Value
String4 = IIf(OptionButtonMontag.Value = True, DateSerial(Year(Date), 1, (ComboBoxKW.Value - 1) * 7 + 2), IIf(OptionButtonDienstag.Value = True, DateSerial(Year(Date), 1, (ComboBoxKW.Value - 1) * 7 + 3), IIf(OptionButtonMittwoch.Value = True, DateSerial(Year(Date), 1, (ComboBoxKW.Value - 1) * 7 + 4), IIf(OptionButtonDonnerstag.Value = True, DateSerial(Year(Date), 1, (ComboBoxKW.Value - 1) * 7 + 5), IIf(OptionButtonFreitag.Value = True, DateSerial(Year(Date), 1, (ComboBoxKW.Value - 1) * 7 + 6), IIf(OptionButtonSamstag.Value = True, DateSerial(Year(Date), 1, (ComboBoxKW.Value - 1) * 7 + 7), IIf(OptionButtonSonntag.Value = True, DateSerial(Year(Date), 1, (ComboBoxKW.Value - 1) * 7 + 8), "")))))))
String50 = IIf(OptionButtonBE.Value = True, "BE", IIf(OptionButtonBüyükGencler.Value = True, "BG", IIf(OptionButtonKG.Value = True, "KG", IIf(OptionButtonCO.Value = True, "CO", ""))))
String6 = IIf(OptionButton1Unterricht.Value = True, "1", IIf(OptionButton2Unterricht.Value = True, "2", IIf(OptionButton3Unterricht.Value = True, "3", IIf(OptionButton4Unterricht.Value = True, "4", IIf(OptionButton5Unterricht.Value = True, "5", IIf(OptionButton6Unterricht.Value = True, "6", IIf(OptionButton7Unterricht.Value = True, "7", "")))))))
'Textkette
TextBoxID.Value = Concat(String2 & String3 & String4 & String50 & String6)
Dies ist die Formel ('Textkette) was ich eingegeben habe, wobei es nicht geklappt hat. Wie kann ich das Problem lösen?