Hi there,
If possible i would like some help in the following matter:
I have a function with a button that sendīs values from an excel cell in one sheet to another sheet, and i would like to have another function that checks if another 2 cells are empty and then pops up a msgbox giving a warning about the empty cells.
If the 2 cells are empty the warning is given and the button will not send anything.
At the moment i have something like this: (but the boolean seems not to work, something is wrong, because even with values on the cells CD11 and CE12 on sheet3 the button dont send anything).
Private Sub Btn_Send_Arrival_Click()
Call Check_ARRIVAL_Code
MsgBox "before boolean is true"
'If cell have values, button works and send values
If ARRIVAL = True Then
MsgBox "after boolean is true"
'Send Comp.1 Bagagge
Sheet1.Range("U34").Value = Sheet5.Range("T143").Value
End If
End Sub
'Check when pessing button if the two ceels are empty
Public Sub Check_ARRIVAL_Code()
Dim ARRIVAL As Boolean
If Sheet3.Range("CD11").Value = "" And Sheet3.Range("CE12").Value = "" Then
MsgBox "Please put values in the empty cells"
ARRIVAL = False
Else
ARRIVAL = True
End If
End Sub
Thanks.
Have a nice holidays everyone.
Bookmarks