Gruppe
Dialog
Problem
Die Bereiche gemäß den CheckBoxAufschriften sollen bei CheckBox-Aktivierung ausgewählt werden.
ClassModule: Tabelle1
Private Sub CheckBox1_Click()
If CheckBox1.Value Then
Range(CheckBox2.Caption).Select
If CheckBox2.Value Then
Range(CheckBox1.Caption, CheckBox2.Caption).Select
Else
Range(CheckBox1.Caption).Select
End If
Else
If CheckBox2.Value Then
Range(CheckBox2.Caption).Select
End If
End If
End Sub
Private Sub CheckBox2_Click()
If CheckBox2.Value Then
Range(CheckBox1.Caption).Select
If CheckBox1.Value Then
Range(CheckBox2.Caption, CheckBox1.Caption).Select
Else
Range(CheckBox2.Caption).Select
End If
Else
If CheckBox1.Value Then
Range(CheckBox1.Caption).Select
End If
End If
End Sub
StandardModule: Modul1
Sub Versenden()
With Workbooks("11215.xls")
.SendMail "hans@herber.de", "test"
.Close savechanges:=False
End With
Application.DisplayFullScreen = False
Application.CommandBars("Worksheet Menu Bar").Enabled = True
End Sub