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

ÁôÂÃ¥\¯à

ÁôÂÃ¥\¯à

¦U¦ì«e½ú§A­Ì¦n!!   
      «e½ú!
          ¿ï¨ú¥ô·NÄæ  «öAA¶s
          ´N¥i¥HÁôÂ䣷QÅý¥L¤H¨Ï¥Îªº¥\¯à
          ½Ð°ÝÂI¿ï¥ô·NÀx¦s®æ  «öBB¶s
          ¦P¼Ë¤]¥i¥HÁôÂ䣷QÅý¥L¤H¨Ï¥Îªº¥\¯à
          ¤£ª¾µ{¦¡¦p¦ó¼g?
          ½Ðª¾¹Dªº«e½ú,¤£§[½ç±ÐÁÂÁ¦A¤T!!  
sub AA()
   Application.CommandBars("Column").Controls(1).Enabled = False '°Å¤U
   Application.CommandBars("Column").Controls(3).Enabled = False '¶K¤W
   Application.CommandBars("Column").Controls(6).Enabled = False '§R°£
   Application.CommandBars("Column").Controls(7).Enabled = False '²M°£¤º®e
End Sub

¦^´_ 1# myleoyes


«Øij±z³Ì¦n¸Ô²Ó»¡©ú¡A¦p¦¹¤~¯àÅý¦³¤ß¤H¤hÀ°¦£±z¸Ñµª¡C

¨Ò¦p:
¡@1.ªí®æ¤º³]¥ß«ö¶s¡A¨Ó¶}±Ò©ÎÃö³¬¥\¯à¡C

¡@2.¨Ì±z¦r­±·N«ä©Ò­z¡A¦pªG¬O­nÃö³¬¡i¶K¤W¡j¡i§R°£¡j¡i²M°£¤º®e ¡j¡i°Å¤U¡j¥\¯à¤£Åý§O¤H¨Ï¥Î¡A
¡@¡@³Ì¦n¬O¦b¶}±Òªí®æ®É´N°õ¦æ¥¨¶°µ{¦¡¡A¤ñ¿é¤JaaÁÙ­n¦n¡C

¡@3.¤S©ÎªÌ±z¾á¤ß°Ê­nExcelªí®æ¤º®e¡A½Ðµ½¥Î¡i«OÅ@ - Âê©w¡j¡i«OÅ@ - ÁôÂáj¥\¯à¡C
§Ú«Ü²Â,©Ò¥H§Ú«Ü¥Î¤ß
¡@§Ú¾ÇÃÀ¤£ºë,¦ý§Ú´÷¨Dª¾ÃÑ

TOP

¦^´_ 2# »k¥ú°j¯T
   «e½ú!¦]¬°¦³µ{¦¡¦b¶]©Ò¥HµLªk¥Î
          «OÅ@¤u§@ªíªº¤è¦¡
          ¦pªþµ{¦¡©Ò¶D
          ½Ð¤£§[½ç±ÐÁÂÁ¦A¤T!!
  1. Sub Åv­­¥\¯à()
  2.     Dim i
  3.     Dim hwd As Long
  4.    'ÅýA:ARÄ檺°Ï°ì¥[¤J¥H¤U¥\¯à
  5.    'Application.CommandBars("Column").Controls(1).Enabled = False '°Å¤U
  6.    'Application.CommandBars("Column").Controls(3).Enabled = False '¶K¤W
  7.    'Application.CommandBars("Column").Controls(6).Enabled = False '§R°£
  8.    'Application.CommandBars("Column").Controls(7).Enabled = False '²M°£¤º®e
  9.    '´N¯àÂI¿ï¥ô·NÀx¦s®æ¥i¥HÁôÂ䣷QÅý¥L¤H¨Ï¥Îªº¥\¯à¥H§Kµ{¦¡¶]¥X¨Óªº¼Æ¾Ú¥¢­s
  10.     If [BB:CT].EntireColumn.Hidden = False Then
  11.           [F21] = "=Text(sheet1!A1, 0)"
  12.           [BB:CT].EntireColumn.Hidden = True
  13.           Application.CommandBars("Column").Controls(11).Enabled = False
  14.     ElseIf [BB:CT].EntireColumn.Hidden = True And [F21] <> "" Then
  15.     For i = 1 To 3
  16.        lTimeID = timeSetEvent(10, 0, AddressOf TimeProc, 1, 1)
  17.        ZZ = InputBox("¿é¤JÅv­­±K½X", "½Ð¿é¤JÀɮ׺޲zªÌ±K½X¡I¡I")
  18.        If ZZ = "" Then End
  19.        If ZZ = [F21] Then
  20.           Application.CommandBars("column").Controls(11).Enabled = True
  21.           [BB:CT].EntireColumn.Hidden = False
  22.           ActiveWindow.ScrollColumn = 53
  23.           [F21] = ""
  24.           End
  25.         '«ì´_:ARÄ檺°Ï°ì¥\¯à
  26.         'Application.CommandBars("Column").Controls(1).Enabled = True '°Å¤U
  27.         'Application.CommandBars("Column").Controls(3).Enabled = True '¶K¤W
  28.         'Application.CommandBars("Column").Controls(6).Enabled = True '§R°£
  29.         'Application.CommandBars("Column").Controls(7).Enabled = True '²M°£¤º®e
  30.        ElseIf ZZ <> [F21] Then
  31.           MsgBox "¡°±K½X¿ù»~¡I¡I§A¦³¡]¢²¦¸¡^¾÷·|°£Àɮ׺޲zªÌ¥~µLªk¨Ï¥ÎOK¡I"
  32.        End If
  33.        If i = 3 Then ThisWorkbook.Close SaveChanges:=False
  34.     Next
  35.     End If
  36. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# »k¥ú°j¯T
«e½ú!©êºp§Ñ¤FªþÀÉ

LeoV78.rar (18.46 KB)

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-10-24 12:57 ½s¿è

¦^´_ 4# myleoyes
¿ï¨ú¥ô·NÄæ  «öAA¶s,´N¥i¥HÁôÂ䣷QÅý¥L¤H¨Ï¥Îªº¥\¯à
ÂI¿ï¥ô·NÀx¦s®æ  «öBB¶s,    ¦P¼Ë¤]¥i¥HÁôÂ䣷QÅý¥L¤H¨Ï¥Îªº¥\¯à

½Ð°Ý «öAA¶s,«öBB¶s ªº®t²§ÂI¦b­þ¸Ì??
   
«e½ú!¦]¬°¦³µ{¦¡¦b¶]©Ò¥HµLªk¥Î, «OÅ@¤u§@ªíªº¤è¦¡

¥i°Ñ¦Ò ³o¸Ì  [«OÅ@¤u§@ªí¦³³\¦h¿ï¶µ,¥i°Ñ¦ÒVBA»¡©ú, Protect ¤èªk]

¥[±j¤@¤U,­­¨îªºÅv­­.
  1. Option Explicit
  2. Dim Ar()
  3. Sub Ex_­­¨îªºÅv­­()
  4.     Ar = Array("½Æ»s", "°Å¤U", "¶K¤W", "§R°£", "²M°£¤º®e", "¨ú®øÁôÂÃ")
  5.     '­­¨î³]¸m True
  6.     ­­¨î³]¸m False
  7.     Application.CommandBars("Column").ShowPopup
  8. End Sub
  9. Private Sub ­­¨î³]¸m(Msg As Boolean)
  10.     Dim Com As CommandBar, C As Object, Cc As Object
  11.     On Error Resume Next
  12.     If Msg Then
  13.         For Each Com In Application.CommandBars
  14.             Com.Reset   'À³¥Îµ{¦¡¤¤ªº©R¥O¦Cªº­«³](«ì´_­ì³]©w)
  15.         Next
  16.         Exit Sub
  17.     End If
  18.     For Each Com In Application.CommandBars
  19.         For Each C In Com.Controls
  20.             ­­¨î³]¸m_°Æµ{¦¡ C, Msg
  21.             For Each Cc In C.Controls
  22.                 ­­¨î³]¸m_°Æµ{¦¡ Cc, Msg
  23.             Next
  24.         Next
  25.     Next
  26. End Sub
  27. Private Sub ­­¨î³]¸m_°Æµ{¦¡(C As Object, xMsg As Boolean)
  28.     Dim A As Variant
  29.     For Each A In Ar
  30.         If C.Caption Like A & "*" Then C.Enabled = xMsg
  31.     Next
  32. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 5# GBKEE
¨}®v!
     ³o¼Ëµ{¦¡¬OOK!
     ¦ý¦³¥t¤@­Ó§xÂZ¤]´N¬O»¡
     ¤@¦ý½d¨ÒÀÉ°õ¦æ­­¨î¥\¯à¤§«á
     ¦A¶}±Òªº¥ô·NÀɮ׳£¦P¼Ë¤]
     ·|¨ü­­¬Û¦P¥\¯à¦ÓµLªk¨Ï¥Î
     ³o¼Ë¬O¿ù»~ªº...
     À³¸Ó¬OAÀÉ°õ¦æ­­¨î¥\¯à
     ´N¥u¾A¥Î©óAÀɦӤ£²o¯A¨ì
     ¨ä¥LÀɤ~¦³·N¸q
     ¤£ª¾¥i§_¦³¸Ñ?
     Ãö©ó
     «öAA¶s,«öBB¶s ªº®t²§ÂI¦b­þ¸Ì??
     AA¶s¬O­­¨îÁôÂôú¸Õ¥Î
     BB¶s¬O­­¨î½Æ»s,°Å¤U,¶K¤W,§R°£,²M°£¤º®e´ú¸Õ¥Î
     ¨¯­WÅo!ÁÂÁ¦A¤T!!

TOP

¦^´_ 6# myleoyes
  1. Option Explicit
  2. 'ThisWorkbook¼Ò²Õ ªºµ{¦¡½X
  3. Private Sub Workbook_Open()
  4. 'ThisWorkbook Àɮ׶}±Ò®É¦Û°Ê°õ¦æªº¹w³]¨Æ¥ó
  5.     ­­¨î³]¸m False
  6. End Sub
  7. Private Sub Workbook_BeforeClose(Cancel As Boolean)
  8. 'ThisWorkbook ÀÉ®×Ãö³¬®É¦Û°Ê°õ¦æªº¹w³]¨Æ¥ó
  9.     ­­¨î³]¸m True
  10. End Sub
  11. Private Sub Workbook_WindowActivate(ByVal Wn As Window)
  12. 'ThisWorkbook µøµ¡(¬¡­¶Ã¯)¬°§@¥Î¤¤ªºµøµ¡®É¦Û°Ê°õ¦æªº¹w³]¨Æ¥ó
  13.     ­­¨î³]¸m False
  14. End Sub
  15. Private Sub Workbook_WindowDeactivate(ByVal Wn As Window)
  16. 'ThisWorkbook µøµ¡(¬¡­¶Ã¯)¤£¬O§@¥Î¤¤ªºµøµ¡®É¦Û°Ê°õ¦æªº¹w³]¨Æ¥ó
  17.     ­­¨î³]¸m True
  18. End Sub

  19. '******* ­­¨î³]¸mªºµ{¦¡½X ¥i¸m©ó¤@¯ë¼Ò²Õ¬°¤½¥Îµ{§Ç
  20. Sub ­­¨î³]¸m(Msg As Boolean)
  21.     Dim COM As CommandBar, C As Object, Cc As Object, AR()
  22.     AR = Array("½Æ»s", "°Å¤U", "¶K¤W", "§R°£", "²M°£¤º®e", "¨ú®øÁôÂÃ")
  23.     On Error Resume Next
  24.     For Each COM In Application.CommandBars
  25.         For Each C In COM.Controls
  26.             ­­¨î³]¸m_°Æµ{¦¡ C, Msg, AR
  27.             For Each Cc In C.Controls
  28.                 ­­¨î³]¸m_°Æµ{¦¡ Cc, Msg, AR
  29.             Next
  30.         Next
  31.     Next
  32. End Sub
  33. Private Sub ­­¨î³]¸m_°Æµ{¦¡(C As Object, xMsg As Boolean, AR As Variant)
  34.     Dim A As Variant
  35.     For Each A In AR
  36.         If C.Caption Like A & "*" Then C.Enabled = xMsg
  37.     Next
  38. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 7# GBKEE
¨}®v!¦­¦w!!
     ÁÂÁÂ!!
     µ{¦¡ÁöµM¥i¥H¸Ñ¨MÀɮרü­­ªº°ÝÃD
     ¦ý¬O Åv­­¥\¯à¶s
     ½T¥¢¥h·N¸q¦pªþ°ÊµeÀÉ©Ò¥Ü
     ¤p§Ì¶¨Ó¶¥hªº­×§ï´ú¸ÕÁÙ¬OµLªk§ä¥X
     ¨â¥þ¨ä¬üªº¤èªk¨S¿ìªk¦W®v«o¥X²Â®{
     ¥u¦n¦A¦¸³Â·Ð¨}®v
     ¨¯­WÅo!ÁÂÁ¦A¤T!!

LeoV78-A.gif (597.55 KB)

LeoV78-A.gif

LeoV78-C.rar (23.05 KB)

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-10-28 11:05 ½s¿è

¦^´_ 8# myleoyes
°Ñ¦Ò¬Ý¬Ý
ThisWorkbookªºµ{¦¡½X
  1. Private Sub Workbook_Open()
  2. ' Àɮ׶}±Ò®É¦Û°Ê°õ¦æªº¹w³]¨Æ¥ó
  3.     Åv­­¥\¯à
  4. End Sub
  5. Private Sub Workbook_BeforeClose(Cancel As Boolean)
  6.     'ThisWorkbook ÀÉ®×Ãö³¬®É¦Û°Ê°õ¦æªº¹w³]¨Æ¥ó
  7.     ­­¨î³]¸m True
  8. End Sub
  9. Private Sub Workbook_WindowActivate(ByVal Wn As Window)
  10. 'ThisWorkbook µøµ¡(¬¡­¶Ã¯)¬°§@¥Î¤¤ªºµøµ¡®É¦Û°Ê°õ¦æªº¹w³]¨Æ¥ó
  11.     ­­¨î³]¸m Àɮ׺޲zªÌ   
  12. End Sub
  13. Private Sub Workbook_WindowDeactivate(ByVal Wn As Window)
  14. 'ThisWorkbook µøµ¡(¬¡­¶Ã¯)¤£¬O§@¥Î¤¤ªºµøµ¡®É¦Û°Ê°õ¦æªº¹w³]¨Æ¥ó
  15.     ­­¨î³]¸m True
  16. End Sub
½Æ»s¥N½X
Module1ªºµ{¦¡½X
  1. Public Àɮ׺޲zªÌ As Boolean
  2. Sub Åv­­¥\¯à()
  3.     Dim zz As String, i As Integer
  4.     i = 3
  5.     Do
  6.         zz = InputBox("41821 ¿é¤JÅv­­±K½X" & vbLf & "§A¦³¡]" & i & "¦¸¡^¾÷·|¥i¥Î¡I", "½Ð¿é¤JÀɮ׺޲zªÌ±K½X¡I¡I")
  7.         i = i - 1
  8.     Loop Until zz = [F21] Or i <= 0 Or zz = ""
  9.     If zz = Sheet2.[F21] Then
  10.         Àɮ׺޲zªÌ = True
  11.         ­­¨î³]¸m Àɮ׺޲zªÌ        
  12.     ElseIf zz <> Sheet2.Range("F21") Then
  13.         Àɮ׺޲zªÌ = False
  14.         ­­¨î³]¸m Àɮ׺޲zªÌ
  15.         'ThisWorkbook.Close SaveChanges:=False
  16.     End If
  17. End Sub
  18. Sub «ö¶s1()  '¨ú®ø Àɮ׺޲zªÌ
  19.     Àɮ׺޲zªÌ = False
  20. End Sub
½Æ»s¥N½X
Sheet2ªºµ{¦¡½X
  1. Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  2.     If Àɮ׺޲zªÌ = False Then Åv­­¥\¯à
  3. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 9# GBKEE
¨}®v!
     ©êºp!ªñ¤é¨Ó¥[¯Z©µ»~¦^ÂÐ
     µ{¦¡OK!¤èªk¦p¤U
  1. Private Sub Workbook_WindowActivate(ByVal Wn As Window)
  2. 'ThisWorkbook µøµ¡(¬¡­¶Ã¯)¬°§@¥Î¤¤ªºµøµ¡®É¦Û°Ê°õ¦æªº¹w³]¨Æ¥ó
  3.     ­­¨î³]¸m True
  4. End Sub
  5. Private Sub Workbook_WindowDeactivate(ByVal Wn As Window)
  6. 'ThisWorkbook µøµ¡(¬¡­¶Ã¯)¤£¬O§@¥Î¤¤ªºµøµ¡®É¦Û°Ê°õ¦æªº¹w³]¨Æ¥ó
  7.     ­­¨î³]¸m True
  8. End Sub
  9. Sheet2ªºµ{¦¡½X
  10.   Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  11.      If [BB:CT].EntireColumn.Hidden = False Then
  12.        ­­¨î³]¸m True
  13.      ElseIf [BB:CT].EntireColumn.Hidden = True Then
  14.        ­­¨î³]¸m False
  15.      End If
  16.   End Sub
  17. Sub Åv­­¥\¯à()
  18.     Dim zz As String, i As Integer
  19.     Dim hwd As Long
  20.     If [BB:CT].EntireColumn.Hidden = False Then
  21.           [F21] = "=Text(sheet1!A1, 0)"
  22.           [BB:CT].EntireColumn.Hidden = True
  23.           ­­¨î³]¸m False
  24.     ElseIf [BB:CT].EntireColumn.Hidden = True And [F21] <> "" Then
  25.        i = 3
  26.        Do
  27.        lTimeID = timeSetEvent(10, 0, AddressOf TimeProc, 1, 1)
  28.        zz = InputBox("¿é¤JÅv­­±K½X" & vbLf & "§A¦³¡]" & i & "¦¸¡^¾÷·|¥i¥Î¡I", "½Ð¿é¤JÀɮ׺޲zªÌ±K½X

  29. ¡I¡I")
  30.        i = i - 1
  31.        Loop Until zz = [F21] Or i <= 0 Or zz = ""
  32.            If zz = "" Then
  33.                End
  34.            ElseIf zz = Sheet2.[F21] Then
  35.                [BB:CT].EntireColumn.Hidden = False
  36.                [F21] = ""
  37.                ­­¨î³]¸m True
  38.            ElseIf zz <> Sheet2.[F21] Then
  39.                ThisWorkbook.Close SaveChanges:=False
  40.            End If
  41.     End If
  42. End Sub
½Æ»s¥N½X
¤p§Ì¥t¤@°ÝÃD½Ð±Ð°õ¦æ¤U¦Cµ{¦¡
Private Sub ComboBox1_Change()
        [B5] = ComboBox1.Value
        Sheet1.ComboBox2.Activate
        Application.SendKeys "%{DOWN}"
     End Sub
     Private Sub ComboBox2_Change()
        [C5] = ComboBox2.Value
        [G5].Selec
     End Sub
    Áä½LªºNum lock¿O¬°¦ó·|¦Û°Êº¶·À
     ½Ð¤£§[½ç±Ð¨¯­WÅo!ÁÂÁ¦A¤T!!

TOP

        ÀR«ä¦Û¦b : ¡i®É¶¡¦¨´N¤@¤Á¡j®É¶¡¥i¥H³y´N¤H®æ¡A¥i¥H¦¨´N¨Æ·~¡A¤]¥i¥HÀx¿n¥\¼w¡C
ªð¦^¦Cªí ¤W¤@¥DÃD