作者:乔山办公网日期:
返回目录:excel表格制作
怎么自动调整列宽呢?
这代码意思就是保护工作表而百已,你自己手动也可以。只要把 ”允许度此工作表的问所有用户进行“ 下面的 “设置列格式” 前面的勾去掉,其他随答便,就可以了。
要代码的话你自己录制个宏专看看。没有你那个属版本,2003 运行没问题。
禁用宏则关闭文档,文库里有实例。
纯转载。
Sub myProtect()
If ActiveSheet.ProtectContents Then
ActiveSheet.Unprotect
Else
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
False, AllowFormattingCells:=True, AllowFormattingRows:=True, _
AllowInsertingColumns:=True, AllowInsertingRows:=True, _
AllowInsertingHyperlinks:=True, AllowDeletingColumns:=True, _
AllowDeletingRows:=True, AllowSorting:=True, AllowFiltering:=True, _
AllowUsingPivotTables:=True
End If
End Sub
指定百宏度的知快捷道键版为权Ctrl+J