by chijanzen on 五月 23rd, 2009 | View: 2,556 views
Private Sub Workbook_BeforeClose(Cancel As Boolean) SetFormulaOnEnd Sub Private Sub Workbook_Open() SetFormulaHiddenEnd Sub Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object, _ ByVal Target As Range, Cancel As Boolean) Cancel = TrueEnd Sub
Sub SetFormulaHidden()'刪除先前定義的允許使用者可編輯範圍(Title:="Range1") SetFormulaOn '工作表處於保護狀態時仍能修改 Cells.Locked = False '工作表處於保護狀態時隱藏公式 Cells.FormulaHidden = True '可在受保護工作表中編輯所有儲存格 ActiveSheet.Protection.AllowEditRanges.Add Title:="Range1", Range:=Cells '保護工作表,但是允許所有的編輯功能 ActiveSheet.Protect _ AllowFormattingCells:=True, AllowFormattingColumns:=True, _ AllowFormattingRows:=True, AllowInsertingColumns:=True, _ AllowInsertingRows:=True, AllowInsertingHyperlinks:=True, _ AllowDeletingColumns:=True, AllowDeletingRows:=True, _ AllowSorting:=True, AllowFiltering:=True, _ Password:="chijanzen"End Sub Sub SetFormulaOn() On Error Resume Next ActiveSheet.Unprotect ("chijanzen") ActiveSheet.Protection.AllowEditRanges("Range1").Delete Error = 0End Sub
ActiveSheet.Protection.AllowEditRanges("Range1").Delete 刪除允許編輯儲存格的鎖定範圍
ActiveSheet.Protection.AllowEditRanges("Range1").Delete
刪除允許編輯儲存格的鎖定範圍
Popularity: 37%
Why don't you make one?
Name: « Required
Email Address: « Required
Website URL: « Optional
Type your message here...
You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
發表於討論區 一般訪客留言 於 九月 7, 2010
發表於討論區 一般訪客留言 於 六月 6, 2010
發表於討論區 API函數 於 一月 19, 2010
發表於討論區 技術交流 於 一月 13, 2010
發表於討論區 一般訪客留言 by reader 於 九月 7, 2010 at 9:31 下午
發表於討論區 一般訪客留言 by kenjo 於 六月 6, 2010 at 2:55 下午
發表於討論區 API函數 by chijanzen 於 一月 19, 2010 at 1:50 下午
發表於討論區 API函數 by chijanzen 於 一月 19, 2010 at 1:11 下午
發表於討論區 技術交流 by chijanzen 於 一月 13, 2010 at 5:43 下午
GEOLOC
姓名:超級皮卡丘
網路化名: chijanzen、中國龍
經歷:
Why don't you make one?