wie kann ich es besser lösen, dass wenn ein Textboxeintrag leer ist,
die Zeile dennoch nicht leer bleibt bzw. mit dem nächsten Eintrag bestückt wird.
Danke!
Gruß
Sigi
https://www.herber.de/bbs/user/130879.xlsm
If .txt_Telefon = "" Then
Cells(3, 6) = Cells(3, 6).Offset(1, 0)
Else
Cells(3, 6) = "Telefon:" & .txt_Telefon
End If
Cells(3, 8) = "a"
Private Sub CommandButton1_Click()
Dim i As Long
i = 3
With UserForm1
Range(Cells(i, 6), Cells(7, 8)).Clear
If .txt_Telefon.Value "" Then
Cells(i, 6) = "Telefon:" & .txt_Telefon
End If
If .txt_Fax.Value "" Then
i = i + 1
Cells(i, 6) = "Fax:" & .txt_Fax
End If
If .txt_Mobil.Value "" Then
i = i + 1
Cells(i, 6) = "Mobil:" & .txt_Mobil
End If
If .txt_Mail.Value "" Then
i = i + 1
Cells(i, 6) = "Mail:" & .txt_Mail
End If
If .txt_Home.Value "" Then
i = i + 1
Cells(i, 6) = "Home:" & .txt_Home
End If
End With
End Sub
Gruß Werner