AW: UserForm TextBox in Excel Zelle
05.05.2006 09:59:35
Patrick
hallo
die zahl als double zu deklarieren hat irgendwie nicht wirklcih was gebracht - anbei mal mein source code - jetzt kann man garnichts mehr eintragen - und ich hab keine ahnung warum...
kurze erklärung: in userforms werden 5 werte (kommazahlen) eingegeben - und diese werte müssen in excel zellen eingefügt werden. dadurch werden automatisch in einem diagramm balken erzeugt
Private Sub CommandButton1_Click()
Dim eq As Double
Dim min As Double
Dim max As Double
Dim LA95 As Variant
Dim Schalldosis As Double
eq = TextBox1.Value
min = TextBox2.Value
max = TextBox3.Value
LA95 = TextBox4.Value
Schall = TextBox5.Value
If (IsNumeric(eq) = True Or eq = "") And _
(IsNumeric(min) = True Or min = "") And _
(IsNumeric(max) = True Or max = "") And _
(IsNumeric(LA95) = True Or LA95 = "") And _
(IsNumeric(Schall) = True Or Schall = "") _
Then
Cells(20, 7) = eq
Cells(22, 14) = min
Cells(20, 14) = max
Cells(22, 7) = LA95
Cells(24, 7) = Schall
Unload Me
h_Messdauer.Show
Else
MsgBox "Bitte tragen Sie Zahlen beim LA,eq; LA,min; LA,max; LA,95 und/oder bei der Schalldosis ein"
End If
End Sub