PDA

View Full Version : email macro stops on Debug Run-time error '91'



Allkman
09-16-2016, 01:33 AM
Hello,

I keep getting Debug message "Run-time error '91': Object variable With block variable not set."
On a:
strbody = "Hello" & vbNewLine & vbNewLine & _
"Check the numbers of a : " & Cells(FormulaCell.Row, "B").Value
Once i remove Cells(FormulaCell.Row, "B").Value everything works.

How can i add Cell value in an email body?

Paul_Hossler
09-16-2016, 05:53 AM
I think that somewhere in the rest of the macro that you did not include, you should have something like



Dim FormulaCell as Range

.....


Set FormulaCell = Range("A1")