über Optionsbutten Zelle färben
23.12.2022 08:22:39
Marco
Ich habe eine Userform, wo ich den Inhalt aus den Textboxen in das Tabellenblatt speichere
Das funktioniert auch super.
Jetzt möchte die Userform erweitern und Optionsbotton einfügen.
Diese Optionsbutten haben die Funktion die Zelle zu färben wo auch der Inhalt aus der Textbox Vorgangsnummer eingetragen wird also :
Cells(LoLetzte, 1) = CDbl(Me.Vorgangsnummer.Value)
Wenn ein Optionsbutton aktiv dann soll die Zelle mit der Hintergrundfarbe versehen werden
zb Optionbutton 1 = ColorIndex = 3
Optionbutton 2 =ColorIndex = 6
Optionbutton 3 =ColorIndex = 10
Optionbutton 4 =ColorIndex = 15
Optionbutton 5 =ColorIndex = 10
mein bisheriges Makro ist
Dim LoLetzte As Long
LoLetzte = IIf(IsEmpty(Cells(Rows.Count, 2)), Cells(Rows.Count, 2).End(xlUp).Row, Rows. _
Count) + 1
Cells(LoLetzte, 1) = CDbl(Me.Vorgangsnummer.Value)
Cells(LoLetzte, 2) = Beschreibung
Cells(LoLetzte, 3) = CDbl(Me.Std.Value)
Cells(LoLetzte, 4) = CDbl(Me.Mitarbeiter.Value)
Cells(LoLetzte, 7) = Vorraussichtlich
Cells(LoLetzte, 8) = fester '= Format(fester, "DD.MM.JJJ")
Cells(LoLetzte, 10) = Bemerkung
Cells(LoLetzte, 17) = Auftragsmonat
Cells(LoLetzte, 16) = CDbl(Me.Auftragssumme.Value) 'Selection.HorizontalAlignment = xlCenter
Cells(LoLetzte, 13) = Genehmigung
'schreibt die Daten der Eingabemaske in die entsprechenden Spalten des Excel Sheets
Habt Ihr eine Idee , wie ich das Makro erweitern kann? Vielen Dank
schonmal
Marco