VBA returning blank instead of cell value 0

rjmdc

Well-known Member
Joined
Apr 29, 2020
Messages
672
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

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
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,215,069
Messages
6,122,953
Members
449,095
Latest member
nmaske

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