Herkese iyi akşamlar. Aşağıdaki kodda userform adını değişkene alıyorum ama değişkene aldığım userformun üzerindeki nesnelere müdahale edemiyorum. Run-time error '438' object doesn't support this property or method hatası veriyor.
Kod:
Sub YetkiKontrol()
Set Sh = Sheets("Kullanici_Ytk_Tnt")
Set Form = Sheets("Kullanici_Ytk_Tnt").Range("J1") 'UserForm Adını burda değişkene yazıyorum
Son = Sh.Cells(65536, 3).End(xlUp).Row
For i = 2 To Son
If Sh.Cells(i, 2) = Sheets("Kullanici_Tnt").Range("F1") And Sh.Cells(i, 3) = Form Then
Cmd_Yeni = Sh.Cells(i, 4).Value
Cmd_Yazdır = Sh.Cells(i, 5).Value
Cmd_Bul = Sh.Cells(i, 6).Value
Cmd_Sil = Sh.Cells(i, 7).Value
Cmd_Kayıt = Sh.Cells(i, 8).Value
Cmd_Degistir = Sh.Cells(i, 9).Value
End If
Next i
If Cmd_Yeni = True Then
'YETKİ VAR İSE BUTONU GİZLEMİYORUM
Else
Form.Cmd_Yeni.Visible = False 'burada hata mesajı alıyorum
End If
End Sub
