Excel - 刪除文字方塊

2009-10-18 1:35 am
我想問下, 當一個 Excel 內有大量既文字方塊, 有乜野方法可以一次過將佢地刪除晒????

回答 (3)

2009-10-22 2:28 am
✔ 最佳答案
不用Marco (巨集) 都可以做到。
編輯 到 特殊 物件 確定
然後按 delete 鍵,就可一次過將文字方塊刪除,
若是要用Marco (巨集) 的話,可試試以下的code,亦可一次過將文字方塊刪除。
Sub delete_box()
ActiveSheet.DrawingObjects.Select
Selection.Delete
End Sub

若同一workbook 內有多張worksheet 要刪除文字方塊,用以下的 code。
Sub Delete_box11()
Dim allsheet As Worksheet
Dim allbooks As Workbook
Set allbooks = Application.ActiveWorkbook
Application.ScreenUpdating = False
On Error Resume Next
For Each allsheet In allbooks.Worksheets
allsheet.Select
ActiveSheet.DrawingObjects.Select
Selection.Delete
Next allsheet
Application.ScreenUpdating = True
End Sub

2009-10-21 4:43 pm
只要執行下列 macro, 就可以 一次過 將所有的 text box 刪除:
Sub Macro1()
'
' Macro1 Macro
'
'
x = Sheets(1).Shapes.Count
For i = 1 To x
y = Sheets(1).Shapes(i).Name

If Left(y, 4) = "Text" Then Sheets(1).Shapes(i).Delete

Next i

End Sub
2009-10-20 2:51 pm
1. Hold down the Shift key then click to highlight the row number at left, starting just above (or before) the first text box to be deleted.

2. While holding the Shift key, scroll down to the row just past the last text box to be deleted and click the row number again at left. Now all the rows between your clicks should be highlighted in blue. If not, repeat these two steps. Be careful to place cursor neatly at each of those row numbers.

3. Release the Shift key then right click any part of the hightlighted (blue) area. Click Delete in the pop up menu.

4. All contents in the blue area will be deleted in one hit.

5. If you want to amend a mistake, click the Undo button on toolbar at top. If you continue at this point, the change will become permanent.

6. If the text boxes are in large groups dispersed throughout the Excel file, repeat step 1 and 2 at each group until all gone.

7. Now save the amended file. Don't forget to back it up in another device such as USB HHD as a safety measure.
參考: 我的電腦智識、實踐經驗


收錄日期: 2021-04-13 16:53:27
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20091017000051KK01149

檢視 Wayback Machine 備份