ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

Excel VBA ¥Îtextbox·s¼Wªí³æ¸ê®Æ°ÝÃD

  1. Option Explicit
  2. Public n As Integer
  3. Private Sub CommandButton1_Click()
  4.     If TextBox2.Value > 60 Then n = 20 Else n = 2
  5.     Do
  6.             If Cells(n, "B") = "" Then Exit Do
  7.             n = n + 1
  8.     Loop
  9.     Sheets("Sheet1").Cells(n, "B").Value = TextBox1.Value
  10.     Sheets("Sheet1").Cells(n, "C").Value = TextBox2.Value
  11. End Sub
½Æ»s¥N½X
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

        ÀR«ä¦Û¦b : ¶¢¤HµL¼Ö½ì¡A¦£¤HµL¬O«D¡C
ªð¦^¦Cªí ¤W¤@¥DÃD