UserForm Initialize sayfa aktif ise çalışıyor

cocoa35

Altın Üye
Katılım
6 Eylül 2007
Mesajlar
654
Excel Vers. ve Dili
excel 2016 32 Bit ve Excel 2020 32 Bit Türkçe ve İngilizce
Altın Üyelik Bitiş Tarihi
10-12-2024
Merhaba üstatlar, yapmış olduğum bir çalışmamda UserForm üstündeki TextBoxlara son satırdaki değerlerini Initialize olayı ile aşağıdaki formül ile aldırıyorum ama bir sorun var sayfa aktif ise değerler geliyor aktif değil ise textboxlar boş çıkıyor. Bu konuda yardım lütfen.

Private Sub UserForm_Initialize()
TextBox1.Value = Sheets("Girenpara").Range("F" & Range("F" & Rows.Count).End(xlUp).Row).Value
TextBox2.Value = Sheets("Cıkanpara").Range("F" & Range("F" & Rows.Count).End(xlUp).Row).Value
TextBox3.Text = Val(TextBox1.Text) - Val(TextBox2.Text)
TextBox1 = Format(TextBox1, "###,###.00")
TextBox2 = Format(TextBox2, "###,###.00")
TextBox3 = Format(TextBox3, "###,###.00")
End Sub
 

ÖmerFaruk

Destek Ekibi
Destek Ekibi
Katılım
22 Ekim 2017
Mesajlar
4,779
Excel Vers. ve Dili
Microsoft 365 Tr-64
TextBox1.Value = Sheets("Girenpara").Range("F" & Sheets("Girenpara").Range("F" & Rows.Count).End(xlUp).Row).Value
TextBox2.Value = Sheets("Cıkanpara").Range("F" & Sheets("Girenpara").Range("F" & Rows.Count).End(xlUp).Row).Value
 

cocoa35

Altın Üye
Katılım
6 Eylül 2007
Mesajlar
654
Excel Vers. ve Dili
excel 2016 32 Bit ve Excel 2020 32 Bit Türkçe ve İngilizce
Altın Üyelik Bitiş Tarihi
10-12-2024
TextBox1.Value = Sheets("Girenpara").Range("F" & Sheets("Girenpara").Range("F" & Rows.Count).End(xlUp).Row).Value
TextBox2.Value = Sheets("Cıkanpara").Range("F" & Sheets("Girenpara").Range("F" & Rows.Count).End(xlUp).Row).Value
Sn Ömer bey çok teşekkürler özellikle bu saatteki ilgi ve alakanız için :)
 
Üst