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

[µo°Ý] ÅçÃÒ¤T¦¸¿ù»~«áÃö³¬EXCEL

[µo°Ý] ÅçÃÒ¤T¦¸¿ù»~«áÃö³¬EXCEL

¦U¦ì¤j¤j ³Ìªñ¦bÀ°³æ¦ì§ïµ½³øªí
¥H¤U¬O§Ú¼gªº¿é¤J±K½Xªº¤º®e¡A¦ýªø©x»Ý­nÅçÃÒ¤T¦¸¿ù»~«áÃö³¬EXCEL¡A¥i§_À°§Ú­×¥¿¤@¤U  ·PÁ¦U¦ì°ª¤H
Sub «ö¶s1_Click()

Dim strAdminPWord As String

    Do
   
        strAdminPWord = InputBox("ª`·N¡A¦¹«ö¶s·|Åý¥ÕªO¸ê°Tªì©l¤Æ¡I", "½Ð¿é¤J±K½X")
        
        If strAdminPWord = "6556" Then
            MsgBox "±K½X¥¿½T¡I ", vbOKOnly, "®¥³ß¡I"
            Exit Do

        ElseIf StrPtr(strAdminPWord) <> 0 Then
        MsgBox "±K½X¿ù»~¡I", , "´Ý©À¡ã"
        Exit Sub 'Â÷¶}µ{¦¡
        
        End If
        MsgBox "¤£­n®ð¾k¡A½ÐÄ~Äò¥[ªo¡I"
    Loop Until StrPtr(strAdminPWord) <> 0
   
    MsgBox "Ä~Äò°õ¦æ"
End Sub

¦^´_ 1# cowww


    ÁÂÁ«e½úµoªí¦¹¥DÃD»P±¡¹Ò
¥H¤U¬O«á¾Ç¾Ç²ß¤è®×,½Ð«e½ú°Ñ¦Ò

Option Explicit
Dim N&
Sub TEST_20230329_1()
Application.DisplayAlerts = False
Dim strAdminPWord As String
Do
   strAdminPWord = InputBox("ª`·N¡A¦¹«ö¶s·|Åý¥ÕªO¸ê°Tªì©l¤Æ¡I", "½Ð¿é¤J±K½X")
   If strAdminPWord = "6556" Then
      MsgBox "±K½X¥¿½T¡I ", vbOKOnly, "®¥³ß¡I"
      Exit Do
      ElseIf StrPtr(strAdminPWord) <> 0 Then
         MsgBox "±K½X¿ù»~¡I", , "´Ý©À¡ã"
   End If
If N = 2 Then ActiveWindow.Close Else N = N + 1: MsgBox "¤£­n®ð¾k¡A½ÐÄ~Äò¥[ªo¡I"
Loop Until strAdminPWord = "6556"
MsgBox "Ä~Äò°õ¦æ": N = 0
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

Option Explicit
Dim N&
Sub TEST_20230329_1()
Application.DisplayAlerts = False
Dim strAdminPWord As String
Do
   strAdminPWord = InputBox("ª`·N¡A¦¹«ö¶s·|Åý¥ÕªO¸ê°Tªì©l¤Æ¡I", "½Ð¿é¤J±K½X")
   If strAdminPWord = "6556" Then
      MsgBox "±K½X¥¿½T¡I ", vbOKOnly, "®¥³ß¡I"
      Exit Do
      ElseIf StrPtr(strAdminPWord) <> 0 Then
         MsgBox "±K½X¿ù»~¡I", , "´Ý©À¡ã"
   End If
If N = 2 Then ActiveWindow.Close Else N = N + 1: MsgBox "¤£­n®ð¾k¡A½ÐÄ~Äò¥[ªo¡I"
Loop Until strAdminPWord = "6556"
MsgBox "Ä~Äò°õ¦æ": N = 0
End Sub

³o­Ó¼gªk§ÚµLªk°õ¦æ

§Ú¦³¨â­Ó°ÝÃD
1.Sub TEST_20230329_1()¬°¦ó¤§«e·|¦³
Option Explicit
Dim N&

2.End If
        MsgBox "¤£­n®ð¾k¡A½ÐÄ~Äò¥[ªo¡I"
    Loop Until StrPtr(i) <> 0
³o¤@¬q»yªk¬O­n¦b«ö"¨ú®ø"©Î"X"ªº±¡ªp¤Uµ¹¤©¦^ÂÐ

If N = 2 Then ActiveWindow.Close Else N = N + 1: MsgBox "¤£­n®ð¾k¡A½ÐÄ~Äò¥[ªo¡I"
Loop Until strAdminPWord = "6556"
MsgBox "Ä~Äò°õ¦æ": N = 0
§ï¦¨³o¼Ë·|¤£·|¾É­P«ö"¨ú®ø"©Î"X"ªº±¡ªp¤U°õ¦æ«áÄòªº¤u§@
(¦]¬°³o¬qµ{¦¡½X«á­±¨ä¹êÁÙ¦³¤@¬q±K½XµL²§±`´N°õ¦æ§ó·sªº°Ê§@)

TOP

¦^´_ 3# cowww


    ÁÂÁ«e½ú¦^´_
«á¾Ç¾Ç²ß±¡¹Ò¸Ñ¨M¤è®×¦p¤U,½Ð«e½ú°Ñ¦Ò

Option Explicit
'¡ô±j¨î©ú½T«Å§iÀɮפ¤ªº©Ò¦³ÅܼơA©Î¤¹³\Áô§t«Å§iÅܼÆ
Dim N%
'¡ô«Å§i¼Ò²Õ¦@¥ÎÅܼÆ:N¬Oµu¾ã¼Æ(¦¸¼Æ²Ö­p)
Sub «ö¶s1_Click()
Application.DisplayAlerts = False
'¡ô¥Oµ{§Ç¤£­n°Ý¬O§_¦sÀÉ!¤£¦sÃö³¬ÀÉ®×!
Dim strAdminPWord As String
'¡ô«Å§iÅܼÆ:strAdminPWord¬O¦r¦êÅܼÆ
Do
'¡ô³]µL­­°j°é!­n¦Û¤v·Q¿ìªk¸õ¥X°j°é
   strAdminPWord = InputBox("ª`·N¡A¦¹«ö¶s·|Åý¥ÕªO¸ê°Tªì©l¤Æ¡I", _
   "½Ð¿é¤J±K½X")
   '¡ô¥OstrAdminPWord³o¦r¦êÅܼƬO ¨Ï¥ÎªÌ¿é¤Jªº¹ï¸Ü¤è¶ô,~~~~
   If strAdminPWord = "6556" Then
   '¡ô¦pªGstrAdminPWordÅܼƬO "6556" ??
      MsgBox "±K½X¥¿½T¡I ", vbOKOnly, "®¥³ß¡I"
      '¡ô¥O¸õ¥X´£¥Üµ¡:~~~~
      Exit Do
      '¡ô¥Oµ{§Ç¸õ¥XµL­­°j°é
      ElseIf StrPtr(strAdminPWord) <> 0 Then
      '¡ô¥O¦pªGStrPtr()¦^¶Ç­È¤£¬O0 ??
         MsgBox "±K½X¿ù»~¡I " & N + 1, , "´Ý©À¡ã"
         '¡ô¥O¸õ¥X´£¥Üµ¡:~~~~
         If N = 2 Then ActiveWindow.Close Else: N = N + 1
         '¡ô¦pªGN³oµu¾ã¼Æ¬O 2!:´N¥Oµ{§ÇÃö³¬¦¹ÀÉ®×µøµ¡,
         '§_«h¥ONÅܼƲ֥[ 1

      Else
         MsgBox "¤£­n®ð¾k¡A½ÐÄ~Äò¥[ªo¡I"
         '¡ô§_«h´N¥O¸õ¥X´£¥Üµ¡:~~~~
         Exit Sub
   End If
Loop
N = 0
MsgBox "Ä~Äò°õ¦æ"

'°õ¦æ«á¤è ±K½XµL²§±`´N°õ¦æ§ó·sªº°Ê§@
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¦^´_ 4# Andy2483


¦¨¥\¤F
«D±`·PÁÂAndy2483¤j¤jªºÀ°¦£

TOP

        ÀR«ä¦Û¦b : ¹ï¤÷¥À­nª¾®¦¡A·P®¦¡B³ø®¦¡C
ªð¦^¦Cªí ¤W¤@¥DÃD