NessPJ
Active Member
- Joined
- May 10, 2011
- Messages
- 422
- Office Version
- 365
Hi there,
For some reason i have an IF AND statement that is giving me trouble. I have tried several other examples on the internet that seem to work...yet the statement i wrote will not work properly. When 1 of the 2 statements if TRUE the code is already executed (which should only happen when both are TRUE).
Can anyone help me please?
For some reason i have an IF AND statement that is giving me trouble. I have tried several other examples on the internet that seem to work...yet the statement i wrote will not work properly. When 1 of the 2 statements if TRUE the code is already executed (which should only happen when both are TRUE).
Can anyone help me please?
Code:
Private Sub Tabelkopieren()
Dim TabelX1C1 As String
Dim TabelX1C2 As String
TabelX1C1 = Sheets("Sheet1").Range("L4").Value
TabelX1C2 = Sheets("Sheet1").Range("L5").Value
If (Len(TabelX1C1) = 0) And (Len(TabelX1C2) = 0) Then
GoTo Leeg
Else
'Do Nothing
End If