vba select same cell across all worksheets

  • Thread starter Thread starter tcnolan
  • Start date Start date
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top