What is wrong with the VBA code?

dcharland

New Member
Joined
Mar 2, 2011
Messages
40
need help again.....

Why is this code going straight to the On error statment?

HTML:
 If cell.Value Like "?*@?*.?*" And _
           LCase(Cells(cell.row, "G").Value) = "Yes" And Cells(cell.row, "I").Value = "" Then
             If Cells(4, "E").Value = "Yes" Then Set OutMail = OutApp.createItemFromtemplate(Cells(5, "C").Value) Else Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
I'm 100% positive that G as "Yes" I is "" and E4 as "Yes". It must be something that i'm just not seing??
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
I'm not sure you can have if then else on the same line

But I could be wrong, I'm sure some one will tell me
 
Upvote 0
Re: What is wrong with the VBA code? SOLVED

Hi Dryver14,

the code was fine it was an issue with my .oft file

P.S. Your question is answered :)

Denis
 
Upvote 0

Forum statistics

Threads
1,224,551
Messages
6,179,473
Members
452,915
Latest member
hannnahheileen

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