böyle yazdım oldu
Private Sub CommandButton1_Click()
changeColor Me.TextBox1.Value, Me.TextBox2.Value
End Sub
Private Sub changeColor(controlName As String, colorName As String)
Dim ctrl As Control
For Each ctrl In Me.Controls
If TypeOf ctrl Is MSForms.Frame Then
If ctrl.Enabled = True Then
If (ctrl.Name = controlName) Then
ctrl.BackColor = GetHexColor(colorName)
End If
End If
End If
Next
End Sub
@benbendedeilem