• DİKKAT

    DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
    Altın Üyelik Hakkında Bilgi

spinbutton min max değer

Katılım
17 Nisan 2013
Mesajlar
101
Excel Vers. ve Dili
2007 Microsoft Office Türkçe
2 sorunum var yardımcı olurmusunuz ..

*Aşağıdaki kod minumum ve maksimum değerleri olmadan çalışıyor.. bu değerleri spinbutton ayarlarından da yapamıyorum. minumum 0 , maks. 100 olarak kodu düzenleyebilirmiyiz... ?

*aşağıdaki kodda 2 haneli sayı üretiyor örnek 0,1 - 0,2 - 0,3 gibi fakat
hücre biçimledirde " hücreye uyacak şekilde daralt " yaptığım zaman
2,77555756156289E-17 bu şekilde rakamlar görüyorum.. spibuttonun saymasına göre 0,1 0,2 olarak görmem gerekirken bu rakamlar nerden çıkıyor anlayamadım.. yardımcı olurmusunuz :)



Private Sub SpinButton1_GotFocus()
On Error Resume Next
ActiveCell.Select
End Sub

Private Sub SpinButton1_SpinDown()
On Error Resume Next
ActiveSheets.Select
If Intersect(ActiveCell, [f5:h155,n5:n155,p5:p155]) Is Nothing Then Exit Sub
ActiveCell = ActiveCell - 0.1
End Sub

Private Sub SpinButton1_SpinUp()
On Error Resume Next
ActiveSheets.Select
If Intersect(ActiveCell, [f5:h155,n5:n155,p5:p155]) Is Nothing Then Exit Sub
ActiveCell = ActiveCell + 0.1
End Sub
 
Merhaba,

Bu şekilde deneyin.

Kod:
Private Sub SpinButton1_SpinDown()
On Error Resume Next
If Intersect(ActiveCell, [f5:h155,n5:n155,p5:p155]) Is Nothing Then Exit Sub
[COLOR=red]If ActiveCell <= 0 Then Exit Sub[/COLOR]
ActiveCell = ActiveCell - 0.1
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Private Sub SpinButton1_SpinUp()
On Error Resume Next
If Intersect(ActiveCell, [f5:h155,n5:n155,p5:p155]) Is Nothing Then Exit Sub
[COLOR=red]If ActiveCell >= 100 Then Exit Sub[/COLOR]
ActiveCell = ActiveCell + 0.1
End Sub

.
 
çok teşekkürler :)

Merhaba,

Bu şekilde deneyin.

Kod:
Private Sub SpinButton1_SpinDown()
On Error Resume Next
If Intersect(ActiveCell, [f5:h155,n5:n155,p5:p155]) Is Nothing Then Exit Sub
[COLOR=red]If ActiveCell <= 0 Then Exit Sub[/COLOR]
ActiveCell = ActiveCell - 0.1
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Private Sub SpinButton1_SpinUp()
On Error Resume Next
If Intersect(ActiveCell, [f5:h155,n5:n155,p5:p155]) Is Nothing Then Exit Sub
[COLOR=red]If ActiveCell >= 100 Then Exit Sub[/COLOR]
ActiveCell = ActiveCell + 0.1
End Sub

.

Ömer bey , çok sağolun :)
 
Geri
Üst