larinda4
Board Regular
- Joined
- Nov 15, 2021
- Messages
- 73
- Office Version
- 365
- Platform
- Windows
I have this code and I am wanting to loop through all the sheets in my workbook. I want it to unhide all rows/columns, delete all comments and copy/paste the entire sheet as values, then proceed to the next sheet.
I'm receiving an error for "ws.Cells.PasteSpecial". Any help would be appreciated.
VBA Code:
Sub xCheck()
Dim ws As Worksheet
For Each ws In Worksheets
ws.Columns.EntireColumn.Hidden = False
ws.Rows.EntireRow.Hidden = False
ws.Cells.ClearComments
ws.Cells.PasteSpecial Paste:=xlPasteValues
Next ws
End Sub
I'm receiving an error for "ws.Cells.PasteSpecial". Any help would be appreciated.