incsoft
Altın Üye
- Katılım
- 18 Ağustos 2009
- Mesajlar
- 740
- Excel Vers. ve Dili
- Office Ev ve İş 2021 - Türkçe
- Altın Üyelik Bitiş Tarihi
- 12-12-2024
Excel'de butonlar aracılığıyla gerçekleştirmiş olduğum işlemlere parola sorgulaması eklemek istiyorum.Bazı durumlarda yanlışlıkla butonlara tıkladığımdan komutlar görevini gerçekleştirmekte ve gereksiz yerde komutlar kullanılmaktadır.Butona tıklanıldığından parola sorgulaması yapabilmek için nasıl bir eklenti yapabilirim?
Private Sub CommandButton1_Click()
Range("M3:N9").Select
Selection.ClearContents
Range("M11:N27").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=18
Range("M29:N44").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=15
Range("M46:N75").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-51
Range("U5:U14").Select
Selection.ClearContents
ActiveWindow.SmallScroll ToRight:=12
Range("Y5:Y18").Select
Selection.ClearContents
Range("AA5:AA14").Select
Selection.ClearContents
Range("AC5:AC8").Select
Selection.ClearContents
Range("AC14:AC15").Select
Selection.ClearContents
ActiveWindow.SmallScroll ToRight:=10
Range("AE5:AE14").Select
Selection.ClearContents
Range("AG5:AG14").Select
Selection.ClearContents
Range("AI5:AI14").Select
Selection.ClearContents
ActiveWindow.ScrollColumn = 22
ActiveWindow.ScrollColumn = 21
ActiveWindow.ScrollColumn = 20
ActiveWindow.ScrollColumn = 19
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 1
ActiveWindow.SmallScroll Down:=-18
Range("O1:Q1").Select
End Sub
Private Sub CommandButton1_Click()
Range("M3:N9").Select
Selection.ClearContents
Range("M11:N27").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=18
Range("M29:N44").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=15
Range("M46:N75").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-51
Range("U5:U14").Select
Selection.ClearContents
ActiveWindow.SmallScroll ToRight:=12
Range("Y5:Y18").Select
Selection.ClearContents
Range("AA5:AA14").Select
Selection.ClearContents
Range("AC5:AC8").Select
Selection.ClearContents
Range("AC14:AC15").Select
Selection.ClearContents
ActiveWindow.SmallScroll ToRight:=10
Range("AE5:AE14").Select
Selection.ClearContents
Range("AG5:AG14").Select
Selection.ClearContents
Range("AI5:AI14").Select
Selection.ClearContents
ActiveWindow.ScrollColumn = 22
ActiveWindow.ScrollColumn = 21
ActiveWindow.ScrollColumn = 20
ActiveWindow.ScrollColumn = 19
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 1
ActiveWindow.SmallScroll Down:=-18
Range("O1:Q1").Select
End Sub