Live-Forum - Die aktuellen Beiträge
Anzeige
Archiv - Navigation
504to508
Aktuelles Verzeichnis
Verzeichnis Index
Übersicht Verzeichnisse
Vorheriger Thread
Rückwärts Blättern
Nächster Thread
Vorwärts blättern
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
504to508
504to508
Aktuelles Verzeichnis
Verzeichnis Index
Verzeichnis Index
Übersicht Verzeichnisse
Inhaltsverzeichnis

MAkro kürzen ?

MAkro kürzen ?
24.10.2004 10:48:44
walter
Hallo Zusammen,
kann man folgende Anweisungen kürzen, da ich diese in weiteren 2 CheckBoxen
zum durchführen kopieren muß ?
'----------------- ab hier ausblenden ------------------------------
If CheckBox2.Value = False And CheckBox5.Value = False And CheckBox9.Value = False Then
CheckBox16.Value = False
CheckBox16.BackColor = Me.BackColor
CheckBox16.Enabled = False
Else
CheckBox16.Enabled = True
End If
'----------------------------
If CheckBox2.Value = False Then Label7.Enabled = False
If CheckBox2.Value = False Then TextBox24.Enabled = False
If CheckBox2.Value = False Then TextBox24.BackColor = Me.BackColor
If CheckBox2.Value = False Then TextBox24.Enabled = False
If CheckBox2.Value = True Then Label7.Enabled = True
If CheckBox2.Value = True Then TextBox24.Enabled = True
If CheckBox2.Value = True Then TextBox24.BackColor = vbWhite
If CheckBox2.Value = False Then Label34.Enabled = False
If CheckBox2.Value = False Then TextBox18.Enabled = False
If CheckBox2.Value = False Then TextBox18.BackColor = Me.BackColor
If CheckBox2.Value = False Then TextBox18.Enabled = False
If CheckBox2.Value = True Then Label34.Enabled = True
If CheckBox2.Value = True Then TextBox18.Enabled = True
If CheckBox2.Value = True Then TextBox18.BackColor = vbWhite
'-------------------------------------------------------------------
Gruß Walter

4
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
AW: MAkro kürzen ?
24.10.2004 11:58:22
Klaus-Dieter
Hallo Walter,
ohne das jetzt inhaltlich betrachtet zu haben:
If CheckBox2.Value = False Then
Label7.Enabled = False
TextBox24.Enabled = False
TextBox24.BackColor = Me.BackColor
TextBox24.Enabled = False
Label7.Enabled = True
TextBox24.Enabled = True
TextBox24.BackColor = vbWhite
Label34.Enabled = False
TextBox18.Enabled = False
TextBox18.BackColor = Me.BackColor
TextBox18.Enabled = False
Label34.Enabled = True
TextBox18.Enabled = True
TextBox18.BackColor = vbWhite
End If

( Da scheint die eine oder andere Anweisung mehrfach vorzukommen bzw. sie wiedersprechen sich).
Gruß Klaus-Dieter

Anzeige
Dank
26.10.2004 17:48:04
walter
Hallo Klaus-Dieter,
mußte dringend verreisen, danke für den Tip.
Gruß Walter
AW: MAkro kürzen ?
Ulf
With CheckBox2
Label7.Enabled = .Value
TextBox24.Enabled = .Value
'usw. für alle Controls
End With
Ulf
Danke
26.10.2004 17:49:15
walter
Hallo Ulf,
danke war 2 Tage unterwegs, konnte jetzt erst kontr. und anwenden.
Gruß Walter

Links zu Excel-Dialogen

Beliebteste Forumthreads (12 Monate)

Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige