Protection.AllowDeletingColumns プロパティ (Excel)

保護されたワークシートで列の削除が許可されている場合は True を返します。 読み取り専用の Boolean です。

構文

AllowDeletingColumns

Protection オブジェクトを表す変数。

注釈

AllowDeletingColumns プロパティは、Protect メソッドの引数を使用して設定できます。

削除されるセルを含む列は、シートが保護されるときにロック解除される必要があります。

この例では、列 A のロックを解除し、ユーザーは保護されたワークシートの列 A を削除できます。

Sub ProtectionOptions() 
 
 ActiveSheet.Unprotect 
 
 'Unlock column A. 
 Columns("A:A").Locked = False 
 
 ' Allow column A to be deleted on a protected worksheet. 
 If ActiveSheet.Protection.AllowDeletingColumns = False Then 
 ActiveSheet.Protect AllowDeletingColumns:=True 
 End If 
 
 MsgBox "Column A can be deleted on this protected worksheet." 
 
End Sub

サポートとフィードバック

Office VBA またはこの説明書に関するご質問やフィードバックがありますか? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。