I am new to this forum and also new to programming. I am trying to create a If condition in VBA where if the excel file has the required value then the file should get attached with a specific email or else no file should be attached ( in case the cell value is blank) and a different email should appear in the Email body.
I am trying to use "NULL" to represent the blank cell value. Is it correct?
Sample of my code -
if sheets("Hello").range("A2").value = Null, then .attachments.remove else .attachments.add "C:\filename.xlsx End if
If Worksheets("Hello").Range("A2").Value = "" Thenor, more appropriately,If IsEmpty(Worksheets("Hello").Range("A2").Value) Then- YowE3K