- Option Explicit
- Dim AR(1 To 2), Sh As Worksheet '¼Ò²Õ ¨p¥ÎÅܼÆ
- Sub auto_open() 'Àɮ׶}±Ò®É¤@¯ë¼Ò²Õ ¦Û°Ê°õ¦æªºÀÉ®×
- Sheets("¥XÀ\³æ").Select
- Dim S As Shape, A(), B(), i As Integer
- Set Sh = Sheets("¥XÀ\³æ")
- For Each S In Sh.Shapes
- If S.Type = msoTextBox Then '¤è¶ôªºType msoTextBox È= 17
- S.OnAction = "check" '«ü©w¥¨¶°
- ReDim Preserve A(i)
- ReDim Preserve B(i)
- A(i) = S.Name '¤è¶ô¦WºÙ
- If i = 0 Then
- Set B(i) = Sh.[A100] '«ü©wÀx¦s®æ
- Else
- Set B(i) = B(i - 1).Offset(1) '«ü©wÀx¦s®æ
- End If
- i = i + 1
- End If
- Next
- AR(1) = A '«ü©w°}¦C¤º®e
- AR(2) = B '«ü©w°}¦C¤º®e
- End Sub
½Æ»s¥N½X- Sub check() '¥²¶·¬O«ö¤U¤è¶ô°õ¦æ¦¹µ{§Ç
- 'AUTO_OPEN '¦p¦³¿ù»~ °õ¦æ AUTO_OPEN ¤@¦¸
- Dim K As String, m As Boolean, i As Integer
- With Sh.Shapes(Application.Caller)
- With .TextFrame
- K = .Characters.Text
- If Left(K, 1) = "X" Then
- .Characters.Text = "O "
- m = False
- Else
- .Characters.Text = "X "
- m = True
- End If
- .Characters(1, Len(K) + 1).Font.Size = 10
- .Characters(1, 1).Font.Size = 32
- End With
- i = Application.Match(.Name, AR(1), 0) - 1 '¨úªº¤è¶ô¦WºÙ¦bAR(1)ªº¯Á¤ÞÈ
- AR(2)(i).Value = m
- AR(2)(i).Offset(, 1).Value = IIf(CSng(m) = 0, 0, 1)
- End With
- End Sub
½Æ»s¥N½X- Sub yy()
- Dim pw
- pw = InputBox("½Ð¿é¤J±K½X: ")
- If pw <> "1234" Then
- MsgBox "±K½X¿ù»~": Exit Sub
- Else
- §Aªº¥¨¶°
- End If
- End Sub
½Æ»s¥N½X |