Hi All
I am trying to copy the range X59:AC71 to the clipboard but columns X:AF are hidden.
I have tried to toggle the hidden status of the columns as below but for some reason the data is not copied properly and will not paste.
It works fine if I don’t rehide the columns after the copy.
Sub CopyIt()
Dim sh As Worksheet
Set sh = ActiveWorkbook.Sheets("Reserves")
Range("X:AF").EntireColumn.Hidden = False
sh.Range("X59:AC71").Copy
Range("X:AF").EntireColumn.Hidden = True
End Sub
Please can someone advise how I can achieve this?
Thanks
Russel
I am trying to copy the range X59:AC71 to the clipboard but columns X:AF are hidden.
I have tried to toggle the hidden status of the columns as below but for some reason the data is not copied properly and will not paste.
It works fine if I don’t rehide the columns after the copy.
Sub CopyIt()
Dim sh As Worksheet
Set sh = ActiveWorkbook.Sheets("Reserves")
Range("X:AF").EntireColumn.Hidden = False
sh.Range("X59:AC71").Copy
Range("X:AF").EntireColumn.Hidden = True
End Sub
Please can someone advise how I can achieve this?
Thanks
Russel