Hi,
I have this structure:
I have this structure:
if I run it it gives me an error hereSub macro()
Dim columnSheet2 As range
With ThisWorkbook
Set valueCell = .Sheets("sheet1").range("B2")
Set timeCell = .Sheets("sheet1").range("J2")
End With
If timeCell.Text <> "#N/A" Then
myHour = Hour(timeCell)
myMinute = Minute(timeCell)
'#######################
If (myHour = 5) Then
If (myMinute = 0) Then
Set columnSheet2 = A65536
...
saying variable not defined, why?Set columnSheet2 = A65536