For selecting :
if radiobutton1.checked=true Then
elseif radiobutton2.checked=true Then
For Each obj As Object In Me.Controls
If obj.Name.Contain("radio") Then
if obj.checked=true Then
Thanks for the reply, Ar K
Sorry for the late reply. I got bumped off this project but am not back on it. I have since been able to detect the radio button, but I cannot find a way to activate it.
It looks like I should have been clearer in my question. Looks like you are referring to a custom made windows form, but what I meant by "data card" was the EPDM data card. So I do not know what the radio button's call name is upfront because I did not create the card with code, but rather used the EPDM card creator and dragged and dropped the radio buttons in.
That all being said, I have been able to find the radio button of interest on the data card, but can't find a way to activate it. My code to find it is:
swFile = v.GetFileFromPath(swPathName, swFolder)
dataCard = swFolder.GetCard("slddrw")
ctrlPos = dataCard.GetFirstControlPosition
While Not ctrlPos.IsNull
dataCardCtrl = dataCard.GetNextControl(ctrlPos)
ctrlType = dataCardCtrl.ControlType
If ctrlType = EdmCardControlType.EdmCtrl_RadioColumn Then
If dataCardCtrl.Name = "Part" Then
str = ""
str = "Card Control: " & dataCardCtrl.Name
str = str & vbLf + "Control ID:" & dataCardCtrl.ID
str = str & vbLf + "Variable ID:" & dataCardCtrl.VariableID
str = str & vbLf + "Control Type:" & ctrlType
'*** found the radio button, but do not know how to activate it!!!***
Just to put closure to this question, I decided to skip over the step of trying to call to the Data Card to preform a task, and jump right to the variables that the task would have impacted and changed them directly. So, I changed my method of solving the problem and therefore do not need to manipulate the Data Card radio buttons.