I am using a macro when outlook opens to insert some data from an email, into a row in excel, I want to add a border to the range in my excel row A to AE.
I am using intRow4
to determine the row address where my information is being entered.
so my code looks like this, but I am getting an object undefined error on Dim Rng As Range
because I get the feeling outlook doesn't support it.
Const SHEET_NAME4 = "Statistics"
excWks4 As Object, _
intRow4 As Integer, _
Set excWks4 = excWkb.Worksheets(SHEET_NAME4)
intRow4 = excWks4.UsedRange.Rows.Count + 1
Dim Rng As Range
Set Rng = ws2.Range("A" & intRow4 & ":AE" & intRow4 & "")
With Rng.Borders
.LineStyle = xlContinuous
.Color = vbBlack
.Weight = xlThin
End With
can someone please show me where I am going wrong with this? Thank you