Filed under: Excel VBA 範例

一次刪除工作表所有註解

by chijanzen on 一月 11th, 2010 | View: 1,339 views

Tags
  • No Tags
Share Comments (0)

公司同事問我要如何快速刪除工作表所有註解,其實蠻簡單的,請看以下說明:


  1. F5 鍵,點選特殊(S)..
  2. 特殊目標對話方塊中選取註解後按確定按鈕,此時會全部選取有註解的儲存格
  3. 如果你想偷懶,也可以直接按 Ctrl+Shift+o 鍵(英文小寫的O),效果同步驟1~2(PS:這就是傳說中的秘笈)
  4. 接著按 Shift+F10 鍵調用快顯方塊,然後按刪除註解(M),OK 註解都刪除了

當然如果你會寫VBA程式碼,只要短短幾行就能解決了

  • Excel 2007

Sub Del_Comments_From_Sheet()
' Remove Comments from Excel 2007 Workbook
ActiveWorkbook.RemoveDocumentInformation (xlRDIComments)
End Sub

  • Excel 2003 以下

Sub Del_Comments_From_Sheet()
' Remove Comments from Excel 2003 Workbook
Dim wks As Worksheet
Dim cmnt As Comment
For Each wks In ActiveWorkbook.Sheets
For Each cmnt In wks.Comments
cmnt.Delete
Next cmnt
Next
End Sub

Popularity: 35%

Join the forum discussion on this post

About the Author
    網路化名: chijanzen、中國龍、邪兵衛 經歷: 第二屆微軟社群之星 第三屆微軟「最有價值專家」 第五屆微軟「最有價值專家」
No comments currently exist for this post.

Why don't you make one?

Get a GravatarLeave a Reply

Name: « Required

Email Address: « Required

Website URL: « Optional

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>

About me
chijanzen 分享個人Excel VBA 學習經驗,架站心得, 日常生活記事等...

Add to Google

分類
Translator
Chinese (Simplified) flagItalian flagKorean flagEnglish flagGerman flag
French flagJapanese flagRussian flagBulgarian flagFinnish flag
相簿