• DİKKAT

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

textboxa toplam alma

Katılım
10 Mayıs 2007
Mesajlar
1,395
Excel Vers. ve Dili
2007 Türkçe
merhabalar, her sayfanın e251 hücresindeki değerleri toplayıp textbox1 e alacak bir kod lazım ilgilenen arkadaşlara teşekkür ederim:)

tabiki sonradan sayfa eklenincede bu toplama dahil edecek?
 
Selamlar,

Aşağıdaki kodu denermisiniz.

Kod:
Private Sub CommandButton1_Click()
    Dim TOPLAM As Double
    For X = 1 To Sheets.Count
    TOPLAM = TOPLAM + Sheets(X).Range("E251")
    TextBox1 = Format(TOPLAM, "#,##0.00")
    Next
End Sub
 
bunu butonsuz yapamıyormuyuz sayın korhan bey.çok teşekkür ederim.
 
tamam userform koduna uyarladım oldu çokj teşekkür edeirm harikasınız:)
 
Private Sub UserForm_initialize()
Dim syf As Worksheet
ListBox1.ColumnCount = 3
For Each syf In Worksheets
If Left(syf.Name, 1) <> "." Then
ListBox1.AddItem
ListBox1.Column(0, ListBox1.ListCount - 1) = syf.Name
ListBox1.Column(1, ListBox1.ListCount - 1) = syf.Range("f1").Value
ListBox1.Column(2, ListBox1.ListCount - 1) = syf.Range("f2").Value
End If
Next syf

Dim TOPLAM As Double
For X = 1 To Sheets.Count
TOPLAM = TOPLAM + Sheets(X).Range("E251")
TextBox1 = Format(TOPLAM, "#,##0.00")
TOPLAM = TOPLAM + Sheets(X).Range("F251")
TextBox2 = Format(TOPLAM, "#,##0.00")


Next



End Sub

ama bu &#351;ekilde yap&#305;nca borcu alaca&#287;&#305; do&#287;ru getirmiyor:(
 
ama bu &#351;ekilde yap&#305;nca borcu alaca&#287;&#305; do&#287;ru getirmiyor:(


Merhaba,

A&#351;a&#287;&#305;daki gibi denermisiniz??

Kod:
Dim [B][COLOR=red]TOPLAM[/COLOR][/B] As Double, [B][COLOR=seagreen]TOPLAMM[/COLOR][/B] As Double
For X = 1 To Sheets.Count
[COLOR=red][B]TOPLAM[/B] [/COLOR]= [COLOR=red][B]TOPLAM[/B][/COLOR] + Sheets(X).Range("E251")
TextBox1 = Format([COLOR=red][B]TOPLAM[/B][/COLOR], "#,##0.00")
[COLOR=seagreen][B]TOPLAMM[/B][/COLOR] = [COLOR=seagreen][B]TOPLAMM[/B] [/COLOR]+ Sheets(X).Range("F251")
TextBox2 = Format([COLOR=seagreen][B]TOPLAMM[/B][/COLOR], "#,##0.00")
Next
 
Geri
Üst