View Single Post
 
Old 01-06-2015, 11:12 PM
Raza Raza is offline Windows 7 32bit Office 2013
Novice
 
Join Date: Jan 2015
Location: Pakistan
Posts: 14
Raza is on a distinguished road
Question Object Variable or With block variable not set

Hi!
Can anybody help me?
It returns that object variable or with block variable not set!

Code:
Private Sub CommandButton21_Click()
Dim marks As Range

Dim result As String

marks = Range(Cells(1, 1), Cells(4, 1))
If Range(Cells(1, 1), Cells(4, 1)) >= 50 Then
result = "pass"
Else
result = "fail"
End If

Range("A6") = result

End Sub

if anyone make that correct for me, I'll be thankful!!!!
Reply With Quote