OfficeUser
Well-known Member
- Joined
- Feb 4, 2010
- Messages
- 544
- Office Version
- 365
- 2016
- Platform
- Windows
I am trying to do loop through all sheets and change a value but it only affects the sheet for which I am on when I run the code.
Any suggestions on what is missing, causing it to not work as planned? Thanks.
Code:
Sub ChangeAllWorksheets()
Dim ws As Worksheet
For Each ws In Worksheets
Range("A3").Value = "Yes"
Next ws
End Sub
Any suggestions on what is missing, causing it to not work as planned? Thanks.