What kind of buttons? From the Forms toolbar or from the Control Toolbox?
What kind of buttons? From the Forms toolbar or from the Control Toolbox?

This month, every Windows Secrets subscriber can download a one-chapter excerpt of Windows 7: The Missing Manual.Windows 7: The Missing Manual provides valuable information to help you overcome these difficulties in learning a new operating system. Subscribe today to download your free excerpt.
Hi Hans
On some sheets there are both.
Regards
Braddy
If you are a fool at forty, you will always be a fool
Insert the following lines immediately below the line with PasteSpecial (and above Next wsT):
For i = wsT.Shapes.Count To 1 Step -1
If wsT.Shapes(i).Type = msoFormControl Then
wsT.Shapes(i).Delete
End If
Next i
For i = wsT.OLEObjects.Count To 1 Step -1
wsT.OLEObjects(i).Delete
Next i
Hi
Attached is code very kindly supplied to me by Hans. It works brilliantly however it also outputs any buttons on the sheet, when pressed in the copy it goes into debug and you can see the passwords.
Is it possible to modify this code so that it only copies the cell data and not the button objects.
Many Thanks in advance.
Braddy
If you are a fool at forty, you will always be a fool
Whenever I'm copying stuff using VBA and don't want any buttons etc. included, I make use of..
Application.CopyObjectsWithCells = False
(I can check current setting and then return it to the previous setting if required).
zeddy
Great tip, thanks! Somehow, this option has always escaped my attention.