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

[µo°Ý] ³o¨ì©³¸Óµo¦b¨º£«?...«ç»ò°µ?·íÀx¦s®æ¿é¤J¼Æ­È«á,¸ÓÀx¦s®æ§Y¦Û°Ê¤WÂê.ÁÂÁÂ!

¦^´_ 11# mark15jill


   {:3_55:} ¦b¤U·M¶w~~~

´ú¸Õ¤§¤U....¦ü¥G¤£¥Î¥Hpassword"123"¸Ñ°£«OÅ@~~ª½±µ ¤u¨ã>«OÅ@>¨ú®ø«OÅ@¤u§@ªí §Y¥i¸ÑÂê¤F...
¦ý¤pªº»Ý­nªº¬O"±N«ü©wÀx¦s®æ¿é¤J¼Æ­È«á,¸ÓÀx¦s®æ¦Û°Ê¤WÂê,¨Ã¥i¥Hpassword¸ÑÂê".

ÁٽЫe½ú©ú¥Ü....ÁÂÁÂ!

TOP

¦^´_ 11# mark15jill
¼Ó¥D1# »¡: ·íÀx¦s®æ¿é¤J¼Æ­È«á,¸ÓÀx¦s®æ§Y¦Û°Ê¤WÂê
­×§ï¼Ó¥D6# µ{¦¡½X
  1. Option Explicit
  2. Private Sub Worksheet_Change(ByVal Target As Range) 'Àx¦s®æ¦³²§°Ê(Target) ¤u§@ªí¹w³]¨Æ¥ó
  3.     'Automatically Protecting After Input
  4.     'unlock all cells in the range first
  5.     Dim MyRange As Range
  6.     Const Password = "123" '**Change password here** ¤u§@ªí¤WÂꪺ±K½X
  7.     'ActiveCell:¨Ï¥Î¤¤Àx¦s®æ
  8.     Set MyRange = Intersect(Range("A1:C10¡AF1:H10"), ActiveCell) '**change range here**
  9.     'Set MyRange = Intersect(Range("A1:C10¡AF1:H10"), Target(1)) '¥ÎTarget(1)¤]¥i¥H
  10.     If Not MyRange Is Nothing Then '¬O¦b->"A1:C10¡AF1:H10"
  11.         Unprotect Password:=Password        '¤u§@ªí¸ÑÂê
  12.         ''MyRange.Locked = True             '"A1:C10¡AF1:H10" Àx¦s®æ¤WÂê
  13.    '****************************************************  
  14.    '¼Ó¥Dªº°ÝÃD:·íÀx¦s®æ¿é¤J¼Æ­È«á,¸ÓÀx¦s®æ§Y¦Û°Ê¤WÂê'
  15.         ActiveCell.Locked = True            '¨Ï¥Î¤¤Àx¦s®æ ¤WÂê
  16.    '*************************************************
  17.         Protect Password:=Password          '¤u§@ªí¤WÂê
  18.     End If
  19. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_  mark15jill


    £­ ........

ºF·\..................................«e½ú,what a ...
kaohsiung-man µoªí©ó 2013-4-22 15:32



    ²³æ¨Ó»¡

Private Sub Worksheet_SelectionChange(ByVal Target As Range)   ..... End Sub   <== ¦n¤ñ¦ÛµM¬Éªº¦ÛµM­·¡A¤£¥Î°µ¥ô¦ó°Ê§@´N·|¦³ ­· ¬y°Ê
Sub kka  .... End Sub  <== ¦n¤ñ¹q­·®°¡A»Ý­n¦³«ö¤U¶}Ãö¡A¤~·|¦³­·

  ¦h°µ¦h·Q¦h¾Ç²ß¡A¤Ö¬Ý¤Ö¿ù¤Ö°g³~

  ¦h°µ=¦h¦h½m²ß¡A¦h¦h½s¼g¡C
  ¦h·Q=·Q·Q¬°¤°»ò¤H®aµ{¦¡­n¨º¼Ë¼g¡A¦pªG´«¦¨¦Û¤v¡A¤S·|«ç¼g¡C
  ¦h¾Ç²ß=¾Ç²ß¤H®aªºµo°Ý¨Ã¸Ñµª¡A¾Ç²ß¤H®aªº¼gªk

  ¤Ö¬Ý=¥u¬Ý¤£°µ¤]ªPµM

TOP

¦^´_ 10# mark15jill


    £­ ........

ºF·\..................................«e½ú,what are U talking about ???

¤pªº ...¤£À´...

TOP

¥»©«³Ì«á¥Ñ mark15jill ©ó 2013-4-22 15:12 ½s¿è
¦^´_  mark15jill
SORRY....#6 ->¤â«ö§Ö¤F°Õ...

¤£¹L...µ²¦Xªº¤è¦¡,¹ê«D¤pªº©Ò¯à·Q ...
kaohsiung-man µoªí©ó 2013-4-22 15:04



    ¤§©Ò¥H¥Î
Private Sub Worksheet_SelectionChange(ByVal Target As Range)   ..... End Sub
¤£¦P©ó
Sub kka  .... End Sub

«eªÌ
´N¬O¥u­n¦³ÅÜ°Ê<¤£ºÞ¬O·Æ¹«ÂIÀ»©ÎÀx¦s®æÅÜ°Ê>¡A´N·|«ö·Óµ{¦¡¥h¶]..°£«D§â¥¨¶°¥\¯àÃö±¼

«áªÌ
­n°õ¦æ«á¡A¥\¯à¤~·|±Ò°Ê....

¦ý¬O
¥u­n±N¥¨¶°¥\¯àÃö±¼©Î¥t¥~³]©w... ³o¤@¤Á³£¨S¥Î£¾£¾

  ¦h°µ¦h·Q¦h¾Ç²ß¡A¤Ö¬Ý¤Ö¿ù¤Ö°g³~

  ¦h°µ=¦h¦h½m²ß¡A¦h¦h½s¼g¡C
  ¦h·Q=·Q·Q¬°¤°»ò¤H®aµ{¦¡­n¨º¼Ë¼g¡A¦pªG´«¦¨¦Û¤v¡A¤S·|«ç¼g¡C
  ¦h¾Ç²ß=¾Ç²ß¤H®aªºµo°Ý¨Ã¸Ñµª¡A¾Ç²ß¤H®aªº¼gªk

  ¤Ö¬Ý=¥u¬Ý¤£°µ¤]ªPµM

TOP

¦^´_ 8# mark15jill
SORRY....#6 ->¤â«ö§Ö¤F°Õ...

¤£¹L...µ²¦Xªº¤è¦¡,¹ê«D¤pªº©Ò¯à·Q¹³~~~

¥u¯à»¡¾ÇÃÀ¤£ºë,²Ê²L¶È±o¥Ö¤ò

......................................................................

¤è¤~´ú¸Õ....¦ü¥G¤£¥Î¥Hpassword¸Ñ°£«OÅ@~~ª½±µ ¤u¨ã>«OÅ@>¨ú®ø«OÅ@¤u§@ªí §Y¥i¸ÑÂê¤F...

«e½ú,½Ð¬d·Ó....ÁÂÁÂ!

TOP

¥»©«³Ì«á¥Ñ mark15jill ©ó 2013-4-22 14:24 ½s¿è

¦³¬~©«ªº¶ûºÃ....<6#>
  1. Private Sub Worksheet_SelectionChange(ByVal Target As Range)


  2.     On Error Resume Next

  3.     ActiveSheet.Unprotect

  4.     ActiveSheet.Cells.Locked = False

  5.    
  6.     Dim Rng1,Rng2 As Range

  7.     ActiveSheet.Unprotect
  8.    
  9. '²Ä¤@­Ó«ÊÂê°Ï°ì   
  10.     For Each Rng1 In Range("A1:C10")  '³o§ï½d³ò

  11.         If Rng1.Value <> "" Or Rng1.HasFormula Then Rng1.Locked = True
  12.         If [x1] = "123" Then Rng1.Locked = False  '³]©w¸Ñ°£±ø¥ó

  13.     Next

  14. '²Ä¤G­Ó«ÊÂê°Ï°ì
  15.     For Each Rng2 In Range("F1:H10") '³o§ï½d³ò

  16.         If Rng2.Value <> "" Or Rng2.HasFormula Then Rng2.Locked = True
  17.          If [x1] = "123" Then Rng2.Locked = False'³]©w¸Ñ°£±ø¥ó
  18.     Next

  19.     ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True

  20. End Sub
½Æ»s¥N½X

  ¦h°µ¦h·Q¦h¾Ç²ß¡A¤Ö¬Ý¤Ö¿ù¤Ö°g³~

  ¦h°µ=¦h¦h½m²ß¡A¦h¦h½s¼g¡C
  ¦h·Q=·Q·Q¬°¤°»ò¤H®aµ{¦¡­n¨º¼Ë¼g¡A¦pªG´«¦¨¦Û¤v¡A¤S·|«ç¼g¡C
  ¦h¾Ç²ß=¾Ç²ß¤H®aªºµo°Ý¨Ã¸Ñµª¡A¾Ç²ß¤H®aªº¼gªk

  ¤Ö¬Ý=¥u¬Ý¤£°µ¤]ªPµM

TOP

¦^´_ 4# mark15jill
³o¬O¤p§b¼gªº¦H§@...¸Ó¦p¦ó»P±zªºµ{¦¡½Xµ²¦X¦¨:
1.·íÀx¦s®æ¿é¤J¼Æ­È«á,¸ÓÀx¦s®æ§Y¦Û°Ê¤WÂê.
2.ªþ¦³¸ÑÂêpassword.
3.¶È¹ïA1~C10¤ÎF1~H10Àx¦s®æ§@¦Û°Ê¤WÂꪺ³]©w.
¬ß±z¤£§[«ü±Ð ~ ÁÂÁ !

Private Sub Worksheet_Change(ByVal Target As Range)
'Automatically Protecting After Input
'unlock all cells in the range first
Dim MyRange As Range
Const Password = "123" '**Change password here**
Set MyRange = Intersect(Range("A1:C10¡AF1:H10"), Target) '**change range here**
If Not MyRange Is Nothing Then
Unprotect Password:=Password
MyRange.Locked = True
Protect Password:=Password
End If
End Sub

TOP

¥»©«³Ì«á¥Ñ kaohsiung-man ©ó 2013-4-22 13:27 ½s¿è

¦^´_ 4# mark15jill


.....¤Ó·P¿E±z£{~~~

¦ý¬O~~~¤WÂê¤F....¤pªº¸Ó«ç»ò¸ÑÂê...¥i§_¦bµ{¦¡½X¤¤¥[¤J¸ÑÂê±K½X©O?

¦Ó¥B,­Y¬O¥u­nÂê©wA1~C10¤ÎF1~H10§Y¥i...¤S¸Ó±q¦ó³B­×§ï©O?


ÁÂÁ«e½ú

TOP

¦^´_  mark15jill


§Ú¬O¤p§b~~ , ¬Oªº~~~~«e½ú!

¥i°¨¤W"¦Û°Ê¤WÂê"ªº·N«ä´N¬O........¹ï¿é¤J¼Æ­Èªº ...
kaohsiung-man µoªí©ó 2013-4-22 08:34


¥H¤Uµ{¦¡½X¥i°µ¨ì... ¦ý¬O... ¬O¤j½d³òªº¡A½Ð¦Û¦æ­×§ï
  1. Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  2.     On Error Resume Next
  3.     ActiveSheet.Unprotect
  4.     ActiveSheet.Cells.Locked = False
  5.    
  6.     Dim Rng As Range
  7.     ActiveSheet.Unprotect
  8.     For Each Rng In ActiveSheet.UsedRange
  9.         If Rng.Value <> "" Or Rng.HasFormula Then Rng.Locked = True
  10.     Next
  11.     ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
  12. End Sub
½Æ»s¥N½X

  ¦h°µ¦h·Q¦h¾Ç²ß¡A¤Ö¬Ý¤Ö¿ù¤Ö°g³~

  ¦h°µ=¦h¦h½m²ß¡A¦h¦h½s¼g¡C
  ¦h·Q=·Q·Q¬°¤°»ò¤H®aµ{¦¡­n¨º¼Ë¼g¡A¦pªG´«¦¨¦Û¤v¡A¤S·|«ç¼g¡C
  ¦h¾Ç²ß=¾Ç²ß¤H®aªºµo°Ý¨Ã¸Ñµª¡A¾Ç²ß¤H®aªº¼gªk

  ¤Ö¬Ý=¥u¬Ý¤£°µ¤]ªPµM

TOP

        ÀR«ä¦Û¦b : «Î¼e¤£¦p¤ß¼e¡C
ªð¦^¦Cªí ¤W¤@¥DÃD