makro ile kimya ödevi

Katılım
16 Mart 2009
Mesajlar
1
Excel Vers. ve Dili
excel 2007 türkçe
merhaba arkadaşlar kimya dersinde makro ödevim vardı makrolarla ilgili bilgim çok az birşeyler yapmaya çalıştım ama hata veriyor ve neden bahsettiğinide pek bilmiyorum. ödev konusu elementlerin konsantrasyonları ekranda açılaca bi kutuya girilecek konsantrasyonun büyüklüğüne göre gösterilen kutunun uzunluğu değişecek ve katyonlar sol sütünda alta doğru anyonlar sağ sütunda alta doğru dizilecek yazmaya çalıştığım kod bölyle birşey olacak:
Private Sub CommandButton1_Click()
Dim eqw_Ca, eqw_Mg, eqw_Na, eqw_K, eqw_fe(II), eqw_Mn As Double

eqw_Ca = 40.078 / 2
eqw_Mg = 24.305 / 2
eqw_Na = 22.989 / 1
eqw_K = 39.098 / 1
eqw_fe(II) = 55.845 / 2
eqw_Mn = 54.938 / 2

Label1.Top = 50
Label1.Visible = True
Label1.Height = 25
Label1.Width = 100

Label2.Height = InputBox("enter the concentration of Ca as mg/L") * 100 / eqw_Ca
Label2.Top = 75
Label2.Visible = True
Label2.Width = 100

Label3.Height = InputBox("enter the concentration of Mg as mg/L") * 100 / eqw_Mg
Label3.Top = Label2.Top + Label2.Height
Label3.Visible = True
Label3.Width = 100

Label4.Height = InputBox("enter the concentration of Na as mg/L") * 100 / eqw_Na
Label4.Top = Label3.Top + Label3.Height
Label4.Visible = True
Label4.Width = 100

Label5.Height = InputBox("enter the concentration of K as mg/L") * 100 / eqw_K
Label5.Top = Label4.Top + Label4.Height
Label5.Visible = True
Label5.Width = 100

Label6.Height = InputBox("enter the concentration of Fe(II) as mg/L") * 100 / eqw_Fr(II)
Label6.Top = Label5.Top + Label5.Height
Label6.Visible = True
Label6.Width = 100

Label7.Height = InputBox("enter the concentration of Mn as mg/L") * 100 / eqw_Mn
Label7.Top = Label6.Top + Label6.Height
Label7.Visible = True
Label7.Width = 100
 
Üst