- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2013-9-13 16:25 ½s¿è
¦^´_ 3# wxad0285
¸Õ¸Õ¬Ý- Option Explicit
- Sub firstrecord()
- Dim a As Integer, b As Integer, c As Integer, d As Integer, e As Integer
- Dim a1 As Integer, b1 As Integer, c1 As Integer, d1 As Integer, e1 As Integer, f1 As Integer, g1 As Integer, h1 As Integer, i1 As Integer
- Dim Sh As Worksheet, xRow As Integer, i As Integer
- Set Sh = Sheets("salary") '³o¸Ì³]¥ß¤u§@ªíÅÜ¼Æ '*** ¦p¤u§@ªín§ï¦WºÙ: ³oùاï¤@¦¸´N¥i¥H *****
- xRow = Application.CountA(Sh.Range("a:a")) '¦³¸ê®ÆÀx¦s®æªºp¼Æ
- With Sh
- .Cells(xRow + 1, "A") = xRow - 1 '½s¸¹: ¬°¦³¸ê®ÆÀx¦s®æªºp¼Æ-1
- For i = 1 To 12
- '±NÀ³¤äª÷ÃB¶ñ¤J¡A¨Ã¬Û¹ïÀ³excelªºÀx¦s®æ' 1-10
- If i <= 10 Then .Cells(xRow + 1, "A").Offset(, i) = UserForm1.Controls("Textbox" & i)
- '±NÀ³¦©ª÷ÃB¶ñ¤J¡A¨Ã¬Û¹ïÀ³excelªºÀx¦s®æ' 11-22
- .Cells(xRow + 1, "M").Offset(, i - 1) = UserForm1.Controls("Textbox" & i + 10)
- Next
- End With
- '±NÀ³¤äª÷ÃB¬Û¥['
- With UserForm1
- 'Àˬdµ{¦¡½X«oÁ`¬O¥X²{"¸ê®Æ«¬ºA¤£¥¿½T"? ->'·í±±¨î¶µ ¬°ªÅ¥Õ®É ¤£¥i§@¥|«h¹Bºâ
- a = Val(.TextBox3) ' a ¤]¥i¥H = ¤u§@ªíªºÀx¦s®æ ,¤£¥²¥[ Val¨ç¼Æ
- b = Val(.TextBox4) * Val(.TextBox5) 'Àx¦s®æ¬°ªÅ¥Õ®É¦Û°ÊÂର 0 ¥i§@¥|«h¹Bºâ
- c = Val(.TextBox6) * Val(.TextBox7)
- d = Val(.TextBox8) * Val(.TextBox9)
- e = Val(.TextBox10)
- 'Åã¥Ü¥XÀ³¤äª÷ÃB¤pp'
- Sh.Range("L3").Value = a + b + c + d + e
- .Label19 = Sh.Range("L3")
- 'Åã¥Ü¦U¶µ¥Ø¤pp'
- .Label35 = b
- .Label34 = c
- .Label13 = d
- '±NÀ³¦©ª÷ÃB¬Û¥['
- a1 = Val(.TextBox11)
- b1 = Val(.TextBox12)
- c1 = Val(.TextBox13)
- d1 = Val(.TextBox14)
- e1 = Val(.TextBox15)
- f1 = Val(.TextBox22)
- g1 = Val(.TextBox16) * Val(.TextBox17)
- h1 = Val(.TextBox18) * Val(.TextBox19)
- i1 = Val(.TextBox20) * Val(.TextBox21)
- 'Åã¥ÜÀ³¦©ª÷ÃB¤pp'
- Sh.Range("Y3").Value = a1 + b1 + c1 + d1 + e1 + f1 + g1 + h1 + i1
- .Label42 = Sh.Range("Y3")
- 'Åã¥Ü¹ê¤äª÷ÃB'
- .Label16 = .Label19 - .Label42
- 'Sh.Range("Y3")-Sh.Range("L3") Àx¦s®æ¬°ªÅ¥Õ®É¦Û°ÊÂର 0
- End With
- End Sub
½Æ»s¥N½X |
|