- Katılım
- 12 Nisan 2012
- Mesajlar
- 533
- Excel Vers. ve Dili
- Microsoft office professional plus 2019
Merhaba.Aşağıdaki kod bloğu ile commandbuttonun üstüne tıklayarak caption'larını değiştiriyorum ama commandbutton nesnesini userform üzerinde uyguladığımda kodlar çalışmıyor.Acaba excel'de olmayan bir özellik midir yoksa kodlarmı eksik kalıyor.Yardımcı olabilirseniz sevinirim.
CommandButton11.ForeColor = RGB(255, 255, 255)
renk1 = RGB(102, 0, 0) 'Kendiniz renkleri uydurabilirsiniz
renk2 = RGB(23, 60, 89) 'Kendiniz renkleri uydurabilirsiniz
renk3 = RGB(0, 51, 0) 'Kendiniz renkleri uydurabilirsiniz
renk4 = RGB(102, 0, 102) 'Kendiniz renkleri uydurabilirsiniz
renk5 = RGB(102, 102, 0)
Select Case CommandButton11.BackColor
Case renk1
CommandButton11.BackColor = renk2
Case renk2
CommandButton11.BackColor = renk3
Case renk3
CommandButton11.BackColor = renk4
Case renk4
CommandButton11.BackColor = renk5
Case renk5
CommandButton11.BackColor = renk1
End Select
If CommandButton11.BackColor = RGB(102, 0, 0) Then
CommandButton11.Caption = "YEDEKLE"
Else
If CommandButton11.BackColor = RGB(23, 60, 89) Then
CommandButton11.Caption = "SAYFA AYARI"
Else
If CommandButton11.BackColor = RGB(0, 51, 0) Then
CommandButton11.Caption = "DÖKÜM"
Else
If CommandButton11.BackColor = RGB(102, 0, 102) Then
CommandButton11.Caption = "AÇIKLAMA"
Else
If CommandButton11.BackColor = RGB(102, 102, 0) Then
CommandButton11.Caption = "DEVİR"
End If: End If: End If: End If: End If
CommandButton11.ForeColor = RGB(255, 255, 255)
renk1 = RGB(102, 0, 0) 'Kendiniz renkleri uydurabilirsiniz
renk2 = RGB(23, 60, 89) 'Kendiniz renkleri uydurabilirsiniz
renk3 = RGB(0, 51, 0) 'Kendiniz renkleri uydurabilirsiniz
renk4 = RGB(102, 0, 102) 'Kendiniz renkleri uydurabilirsiniz
renk5 = RGB(102, 102, 0)
Select Case CommandButton11.BackColor
Case renk1
CommandButton11.BackColor = renk2
Case renk2
CommandButton11.BackColor = renk3
Case renk3
CommandButton11.BackColor = renk4
Case renk4
CommandButton11.BackColor = renk5
Case renk5
CommandButton11.BackColor = renk1
End Select
If CommandButton11.BackColor = RGB(102, 0, 0) Then
CommandButton11.Caption = "YEDEKLE"
Else
If CommandButton11.BackColor = RGB(23, 60, 89) Then
CommandButton11.Caption = "SAYFA AYARI"
Else
If CommandButton11.BackColor = RGB(0, 51, 0) Then
CommandButton11.Caption = "DÖKÜM"
Else
If CommandButton11.BackColor = RGB(102, 0, 102) Then
CommandButton11.Caption = "AÇIKLAMA"
Else
If CommandButton11.BackColor = RGB(102, 102, 0) Then
CommandButton11.Caption = "DEVİR"
End If: End If: End If: End If: End If
