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

¦Û°ÊÁôÂéMÅã¥Ü

¦Û°ÊÁôÂéMÅã¥Ü

¦U¦ì¤j¤j:

  ¦pªG§Ú·Q³]©w·í[m1] ¿é¤J"11" ®É, BÄæ·|ÁôÂéM³]©wÁôÂñK½X, ¦Ó·í[M1] ¤£¬O"11"®É,B Äæ´N¤£·|ÁôÂéM¨ü¨ì«OÅ@,½Ð°Ý±øCODE À³¸Ó§@¼ËÂI¼g?? §Ú¸Õ¹L¦n¦h¤èªk³£¤£¦¨...½Ð¨D¦U¦ìÀ°¦£

¦^´_ 1# mdr0465

©ñ¨ì¸Ó¤À­¶ª«¥ó¤º,¤£¯à©ñ¨ì¤@¯ëªº¼Ò²Õ¤º
­Y¤£·Q¦]¬°«OÅ@¦ÓµLªk¿é¤J,½Ð¥ý±NÀx¦s®æªº«OÅ@¥þ³¡¨ú®øÂê©w
  1. Private Sub Worksheet_Change(ByVal Target As Range)
  2. If Not Intersect(Target(1), Range("m1")) Is Nothing Then
  3.     If CStr(Range("m1")) = "11" Then
  4.         Columns("B:B").EntireColumn.Hidden = True
  5.         ActiveSheet.Protect Password:="1234", DrawingObjects:=True, Contents:=True, Scenarios:=True
  6.     Else
  7.         ActiveSheet.Unprotect Password:="1234"
  8.         Columns("B:B").EntireColumn.Hidden = False
  9.     End If
  10. End If

  11. End Sub
½Æ»s¥N½X
PKKO

TOP

¥»©«³Ì«á¥Ñ mdr0465 ©ó 2016-8-2 23:12 ½s¿è

PKKO ¯uªºÁÂÁ§Aªº¦^ÂÐ, §Aªºcode ¯uªº«D±`¦³¥Î,
¦ý¦pªG§Ú·Q¬Û¤Ï°µªk, ¤@¶}©l®ÉBÄæÁôÂÃ,·í[m11] ¿é¤J"11"®É,BÄæ´N¨S¦³ÁôÂÃ¥i¥H­×§ï, ½Ð°Ý±øCODE À³¸ÓÂI¼g©O?? ÁÂÁÂ

TOP

¦^´_ 3# mdr0465
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Private Sub Worksheet_Change(ByVal Target As Range)
  3.     If Not Intersect(Target(1), Range("m1")) Is Nothing Then
  4.         If CStr(Range("m1")) = "11" Then
  5.             If Not Columns("B:B").EntireColumn.Hidden Then
  6.                 Columns("B:B").EntireColumn.Hidden = True
  7.                 ActiveSheet.Protect Password:="1234", DrawingObjects:=True, Contents:=True, Scenarios:=True
  8.             End If
  9.         Else
  10.             ActiveSheet.Unprotect Password:="1234"
  11.             Columns("B:B").EntireColumn.Hidden = False
  12.         End If
  13. End If
  14. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ÀR§¤±`®¦¤v¹L¡B¶¢½Í²ö½×¤H«D¡C
ªð¦^¦Cªí ¤W¤@¥DÃD