SteveOranjin
Board Regular
- Joined
- Dec 18, 2017
- Messages
- 170
I have some code that makes changes to an entire sheet that I'm working with. I thought I would change it so it would make changes to ONLY the first row. This being because the type of data the code is looking for will only be in the first row.
However, now when I select the formula to operate on a different tab. It doesn't work as it should.
The only difference between my VBA and the VBA in the actual macro is that the macro runs through about forty or fifty of these, instead of just one. Can someone please help me understand why this only works when I am ON the tab in question?
Hope you are well,
Steve
However, now when I select the formula to operate on a different tab. It doesn't work as it should.
Code:
Application.ScreenUpdating = False
Sheets("Data Sheet").Rows("1").Select
Selection.Replace What:="Product Name", Replacement:="Productname", Lookat:=xlWhole, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Application.ScreenUpdating = True
End Sub
Hope you are well,
Steve