View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jarek Kujawa[_3_] Jarek Kujawa[_3_] is offline
external usenet poster
 
Posts: 37
Default How to add condition to coding?

If wkbk Is Nothing And myCell.Offset(0, 2).Value < DateSerial(Year(Now),
Month(Now), Day(Now)) Then

HIH


Użytkownik "Eric" napisał w wiadomości
...
Does anyone have any suggestions on how to add condition into coding?

I would like to add the condition, please see []
If wkbk Is Nothing [and myCell.Offset(0, 2).Value is not equal today]
Then
Thanks in advance for any suggestions
Eric

======================================
Original Coding
======================================

If wkbk Is Nothing Then
myCell.Offset(0, 1).Value = "Failed to open!"
Else
wkbk.Close savechanges:=True
myCell.Offset(0, 1).Value = "ok"