bepedicino
Board Regular
- Joined
- Sep 29, 2014
- Messages
- 73
I am a newbiee with no VBA experince. I have the following code that copies all sheets and then paste it as values. I would some assistance if someone could please modify the code to unhide all hidden columns first and then past all as values. If possible, I would then like it to delete all sheets other than the one that I have selected.
Any help would be greatly appreciated!
Sub Test()
Dim Sh As Worksheet
For Each Sh In ThisWorkbook.Worksheets
If Sh.Visible = True Then
Sh.Activate
Sh.Cells.Copy
Sh.Range("A1").PasteSpecial Paste:=xlValues
Sh.Range("A1").Select
End If
Next Sh
Application.CutCopyMode = False
End Sub
Any help would be greatly appreciated!
Sub Test()
Dim Sh As Worksheet
For Each Sh In ThisWorkbook.Worksheets
If Sh.Visible = True Then
Sh.Activate
Sh.Cells.Copy
Sh.Range("A1").PasteSpecial Paste:=xlValues
Sh.Range("A1").Select
End If
Next Sh
Application.CutCopyMode = False
End Sub