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

¦³Ãö«OÅ@¤u§@ªí¥N½XµLªk±N¤u§@ªíÁôÂ꺶µ¥ØÁôÂÃ

¦³Ãö«OÅ@¤u§@ªí¥N½XµLªk±N¤u§@ªíÁôÂ꺶µ¥ØÁôÂÃ

·í°õ¦æchecklocksheet®É¡AµLªk±N¤u§@ªí³]©wÀx¦s®æ®æ¦¡¬°ÁôÂ꺶µ¥ØÁôÂáA­ì¥»¹q¸£¬°win10-excel2019³£¨S¦³°ÝÃD¡A¨ìwin11-excel365°Ó°Èª©®É´N·|¶]§¹µ{¦¡½X«oÁÙ¬O¥i¥H¬Ý¨ì¤w¸gÀx¦s®æ®æ¦¡¬°Âê©w¤ÎÁôÂêºÀx¦s®æ
  1. Private Sub checklocksheet()
  2. Dim strPassword As String
  3.     strPassword = "123456789"
  4.     Sheets("¤u§@ªí1").Select
  5.     ActiveSheet.Protect Password:=strPassword, _
  6.         DrawingObjects:=True, _
  7.         Scenarios:=True, _
  8.         AllowFormattingCells:=True, _
  9.         AllowFormattingColumns:=True, _
  10.         AllowFormattingRows:=True, _
  11.         AllowInsertingColumns:=True, _
  12.         AllowInsertingRows:=True, _
  13.         AllowInsertingHyperlinks:=True, _
  14.         AllowDeletingColumns:=True, _
  15.         AllowDeletingRows:=True, _
  16.         AllowSorting:=True, _
  17.         AllowFiltering:=True, _
  18.         AllowUsingPivotTables:=True
  19.     Sheets("¤u§@ªí2").Select
  20.     ActiveSheet.Protect Password:=strPassword, _
  21.         DrawingObjects:=True, _
  22.         Scenarios:=True, _
  23.         AllowFormattingCells:=True, _
  24.         AllowFormattingColumns:=True, _
  25.         AllowFormattingRows:=True, _
  26.         AllowInsertingColumns:=True, _
  27.         AllowInsertingRows:=True, _
  28.         AllowInsertingHyperlinks:=True, _
  29.         AllowDeletingColumns:=True, _
  30.         AllowDeletingRows:=True, _
  31.         AllowSorting:=True, _
  32.         AllowFiltering:=True, _
  33.         AllowUsingPivotTables:=True
  34. End Sub
½Æ»s¥N½X

        ÀR«ä¦Û¦b : §Ñ¥\¤£§Ñ¹L¡A§Ñ«è¤£§Ñ®¦¡C
ªð¦^¦Cªí ¤W¤@¥DÃD