Oorang
Well-known Member
- Joined
- Mar 4, 2005
- Messages
- 2,071
In Excel 2003 you have the option to to use the "find" feature (ctrl-F) over the entire worksheet. This is pretty cool and I'm glad they added it. However I have a macro that uses the following snippet of code:
The problem occurs when the last user has used the find replace feature to look in all sheets. In that circumstance, when the code executes, the macro does not seem to limit itself to replacing in just the specificed range (Range(Range("A65000").End(xlUp).Offset(0, 6).Address, "G2")) it will do it over the entire used range in the sheet.
I THINK if I could set the property back to just the activesheet right before the code executes, it will fix the problem. However I cannot seem to locate it in the help file or the support site. Help please?
Code:
Range(Range("A65000").End(xlUp).Offset(0, 6).Address, "G2").Replace What:="", Replacement:="F", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
I THINK if I could set the property back to just the activesheet right before the code executes, it will fix the problem. However I cannot seem to locate it in the help file or the support site. Help please?