I'm trying to make some code more efficient. What I need to do is duplicate an entire sheet and then replace one of the ranges with values only.
One of the problems I have is that I want to avoid referring to the new sheet by name since I need to repeat this action and each new sheet will have a new name. I'm sure there is a way to control the new sheet name so that it can be referred to but I prefer not to do so since it would probably complicate things.
Here is my original code. Don't read it, it's just here for posterity.
I think I can distill all of this down to two lines. Here is the first thing that I tried:
I have two problems with this. It seems to be quite a bit slower and it won't let me do .Value.
I like this method better but the VBE doesn't like my use of "Previous":
I like the idea of getting this down to two lines of code but more important to me is making it fast and minimizing flickering or screen redraw.
Help is appreciated. Thank you for reading!
Bookmarks