Greetings,
I get the subject compile error at the line:
The code is:![]()
Set sFraName = Fr.Name
The variables are declared at the top of the userform module after "Option Explicit"![]()
Private Sub NameEnabledFrame() Call CountFrames For i = 2 To iCountFra Set Fr = Me.Controls("Frame" & i) If Fr.Enabled = True Then Set sFraName = Fr.Name End If Next End Sub
Can someone please tell me why I am getting the error?![]()
Dim iCountFra As Integer 'Number of frames in the userform Dim sFraName As String 'Name of the frame enabled as per optionbutton selection Dim i As Integer Dim Fr As MSForms.Frame
Many thanks
Asha
Bookmarks