Pavan.Sada.PS
Member
Dear Friends,
Please look at the attached file and access sub routine QuestionPaper_O2C_Germany which is in Sheet3.
I am trying to assign value to a variable based on the cell value in sheet mentioned in the Range(QPName)
In case of cell contains any value <> to x then option button caption has to be updated with the cell value else (empty cases) option button has to be disabled.
I think I have a problem with the below part of the code.
Please look at the attached file and access sub routine QuestionPaper_O2C_Germany which is in Sheet3.
I am trying to assign value to a variable based on the cell value in sheet mentioned in the Range(QPName)
In case of cell contains any value <> to x then option button caption has to be updated with the cell value else (empty cases) option button has to be disabled.
I think I have a problem with the below part of the code.
Code:
Dim i As Integer
Dim Answer As String
Set ws = Sheet3
For ObjNum = 1 To ws.OLEObjects.Count
Set obj = ws.OLEObjects(ObjNum)
Set objobject = obj.Object
'--------------------------------------------------------------
If TypeName(objobject) = "OptionButton" Then
If "Opn" & ObjNum <> Empty Then
Answer = "Opn" & ObjNum
objobject.Caption = Answer
Else
objobject = 0
End If
End If
Next ObjNum
Attachments
Last edited by a moderator: