I have the following option buttons within a frame on a user form. I storing the value of the option button that passes as true. The text "Test 1, Test 2......" is then passed to the corresponding worksheet.
I would also like to capture which option button passes as true so that the corresponding text is stored to a variable.
I attempted to create the myChange variable placed at the top of the module, then i was planning on calling the variable from another sub routine, to do some further evaluation.
Dim myChange (1 to 40) as Variant
If OpbTypeOne = True Then
ws.Cells(2, 5).Value = "Test 1"
myChange(1) = "Test 1"
End If
If OpbTypeTwo = True Then
ws.Cells(2, 5).Value = "Test 2"
myChange(1) = "Test 2"
End If
The second sub routine is per the following
Sub VerifyOkay()
Dim myVerify(1 To 40) As Variant
myVerify(1) = txtPlanningNo.Value
myVerify(2) = cboEngineer.Value
.
.
.
myVerify(6) = myChange(1)
The macro fails on the myVerify(6) = myChange(1) line, the error is "Sub or Function not defined", obviously i've done something wrong with the myChange variable, could someone explain what is wrong and suggestions on correcting this.
Thanks
Bookmarks