VBA returning blank instead of cell value 0

rjmdc

Well-known Member
Joined
Apr 29, 2020
Messages
704
Office Version
  1. 365
Platform
  1. Windows
the email produces value as blank when cell value is 0
Rich (BB code):
Sub EmailTotalFraud()
  Dim sMail As String, sSubj As String, sBody As String
  Dim TotalFraud        As Integer:     TotalFraud = Worksheets("Fraud Check").Range("TotalFraudulent").Value
  Dim TotalAgencyFraud  As Integer:     TotalAgencyFraud = Worksheets("Fraud Check").Range("AgencyFraudulent").Value
  Dim FileName          As String:      FileName = "Individual and Agency Fraud Check " & Replace(ReportDate, "/", ".")
  Dim FullFilePath      As String
  Dim ReportDate2       As String:      ReportDate2 = Date
  Dim SaveFolder1       As String:      SaveFolder1 = "M:\all\Fraud Check Complete\"
  
  FullFilePath = ExportFolder & PeriodRunFolder

        sMail = "chayac@mea@a.org"
        sSubj = "Individual and Agency Providers Fraud Check"
        sBody = "Fraud check was processed and reviewed on " & Date & "  Total Individual Fraud found " & TotalFraudulent & "  Total Agency Fraud found " & AgencyFraudulent & "." & vbCrLf & _
                 FileName & "can be found in " & SaveFolder1
        Call SendMailTotal(sMail, sSubj, sBody)
      
End Sub
the cell value of agencyfruadulent etc is 0 but the message has a blank instead
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
i dont undretsnad i am saying ex totalfraudulent in the body and the variable is a cell range .value
what do i need to correct?
 
Upvote 0
thanks i already reviewed and figured it out
 
Upvote 0

Forum statistics

Threads
1,224,041
Messages
6,176,041
Members
452,698
Latest member
MikaVmex

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top