Merhabalar. Yapmak istediğim bir excel dosyasında userform var ve bunun üstünde 480 tane textboxvar. Bu textboxlarda aşagıdaki gibi kodla hesaplama yaptırmak istiyorum. Ama bunu döngü ile nasıl yapabilirim. Çok fazla textBox var.Tek tek yazmak çok zor oluyor. En kısa yolu nasıl olur acaba. Yardımcı olursanız sevinirim.
deg1 = IIf(TextBox1 = "", 0, TextBox1)
deg2 = IIf(TextBox2 = "", 0, TextBox2)
deg3 = IIf(TextBox3 = "", 0, TextBox3)
deg4 = IIf(TextBox4 = "", 0, TextBox4)
deg5 = IIf(TextBox5 = "", 0, TextBox5)
"
"
"
"
TextBox1 = Format(Replace((CDbl(deg1) * CDbl(deg481)), ".", ","), "#,##,0.00")
TextBox1 = Format(TextBox1, "#,##0.00")
TextBox2 = Format(Replace((CDbl(deg2) * CDbl(deg481)), ".", ","), "#,##,0.00")
TextBox2 = Format(TextBox2, "#,##0.00")
TextBox3 = Format(Replace((CDbl(deg3) * CDbl(deg481)), ".", ","), "#,##,0.00")
TextBox3 = Format(TextBox3, "#,##0.00")
TextBox4 = Format(Replace((CDbl(deg4) * CDbl(deg481)), ".", ","), "#,##,0.00")
TextBox4 = Format(TextBox4, "#,##0.00")
TextBox5 = Format(Replace((CDbl(deg5) * CDbl(deg481)), ".", ","), "#,##,0.00")
TextBox5 = Format(TextBox5, "#,##0.00")
"
"
"
"
"
"
"
deg1 = IIf(TextBox1 = "", 0, TextBox1)
deg2 = IIf(TextBox2 = "", 0, TextBox2)
deg3 = IIf(TextBox3 = "", 0, TextBox3)
deg4 = IIf(TextBox4 = "", 0, TextBox4)
deg5 = IIf(TextBox5 = "", 0, TextBox5)
"
"
"
"
TextBox1 = Format(Replace((CDbl(deg1) * CDbl(deg481)), ".", ","), "#,##,0.00")
TextBox1 = Format(TextBox1, "#,##0.00")
TextBox2 = Format(Replace((CDbl(deg2) * CDbl(deg481)), ".", ","), "#,##,0.00")
TextBox2 = Format(TextBox2, "#,##0.00")
TextBox3 = Format(Replace((CDbl(deg3) * CDbl(deg481)), ".", ","), "#,##,0.00")
TextBox3 = Format(TextBox3, "#,##0.00")
TextBox4 = Format(Replace((CDbl(deg4) * CDbl(deg481)), ".", ","), "#,##,0.00")
TextBox4 = Format(TextBox4, "#,##0.00")
TextBox5 = Format(Replace((CDbl(deg5) * CDbl(deg481)), ".", ","), "#,##,0.00")
TextBox5 = Format(TextBox5, "#,##0.00")
"
"
"
"
"
"
"