Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Sub to freeze all sheets & delete all comments

Hunting for a sub to freeze all sheets (copy entire sheetpaste special as
values) & delete all comments (in all sheets) in a book. Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Sub to freeze all sheets & delete all comments

For Each sht In Sheets
sht.Cells.Copy
sht.Cells.PasteSpecial past:=xlPasteValues

Next sht


"Max" wrote:

Hunting for a sub to freeze all sheets (copy entire sheetpaste special as
values) & delete all comments (in all sheets) in a book. Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Sub to freeze all sheets & delete all comments

Something like that :?

--------------------------------------------------------------
Sub PastValDelComments()
Dim dlgAnswer As Boolean, S As String
Dim OldName As String, NewName As String
Dim xWs As Worksheet
dlgAnswer = False

' SAVE workbook with another name or path
S = "SECURITY : save your worbook with another name, please" & vbCrLf
S = S & vbCrLf & " == with another Name or Path <=="
OldName = ThisWorkbook.Path & "\" & ThisWorkbook.Name

While Not dlgAnswer Or (OldName = NewName)
MsgBox S
dlgAnswer = Application.Dialogs(xlDialogSaveAs).Show
NewName = ThisWorkbook.Path & "\" & ThisWorkbook.Name
Wend

For Each xWs In Worksheets
xWs.Cells.Copy
xWs.Cells.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
xWs.Cells.ClearComments
Next xWs

ThisWorkbook.Save

End Sub
--------------------------------------------------------------





"Max" a écrit dans le message de
...
Hunting for a sub to freeze all sheets (copy entire sheetpaste special as
values) & delete all comments (in all sheets) in a book. Thanks.


  #4   Report Post  
Posted to microsoft.public.excel.programming
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Sub to freeze all sheets & delete all comments

Many thanks, Charabeuh!
That works fine.


  #5   Report Post  
Posted to microsoft.public.excel.programming
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Sub to freeze all sheets & delete all comments

Thanks, Joel. I got what I was looking for from Charabeuh's response.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Freeze column headers for ledger sheets Summer Excel Discussion (Misc queries) 0 April 30th 10 11:04 PM
Comments / Freeze Panes Roger Excel Discussion (Misc queries) 8 January 31st 07 05:39 PM
Comments in freeze pane column jimt Excel Discussion (Misc queries) 0 January 15th 07 08:49 PM
Keyboard freeze when using hyperlinked sheets FinController Excel Programming 0 February 16th 05 05:20 AM
Freeze pane of all Sheets how? japorms[_3_] Excel Programming 1 August 26th 04 08:41 AM


All times are GMT +1. The time now is 11:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"