Thread
:
Object Variable or With block variable not set
View Single Post
01-15-2015, 12:19 AM
gmayor
Windows 7 64bit
Office 2010 32bit
Expert
Join Date: Aug 2014
Posts: 4,142
That's because you are calling column 2 of a range that only has 1 column!
The line
Code:
If marks.Cells(n, 2) < 50 Then
should read
Code:
If marks.Cells(n, 1) < 50 Then
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes
www.gmayor.com
gmayor
View Public Profile
Find all posts by gmayor