vba select same cell across all worksheets

T

tcnolan

Hi...

I am trying, in vba, to select one cell across all the sheets in a
workbook and Copy/Paste Special values.

Can anyone help with the code to select the same cell in all the
worksheets? The sheetnames will not always be the same.

Thank you,

Terry
 
R

Ron de Bruin

One way

Sub test()
Dim sh As Worksheet
For Each sh In ThisWorkbook.Worksheets
sh.Range("B1").Value = sh.Range("B1").Value
Next
End Sub
 
Top