I am quite new to VBA, while I can do simple "Macro Recording".
I am trying to branch out and shorten unnecessary code.
Background of what I am trying to do.
I have a "database" for every month of the Year (so every tab is named JAN - DEC).
To prevent having to write the same VBA 12 times referencing sheets("JAN").select all the way to sheets("DEC").select 48 times.
(exaggeration but you get the gist) I want to be able to create a variable that references the sheet so that if I need to make changes, I am only changing one thing at the top of the code instead of looking at a long string of code and make changes to every line that has "sheets("JAN").select"
Dim xstr as worksheet
Set xstr = Worksheet("JAN")
It seems when I do
xstr.Select I get an "Debug" request at the line I have this code at.
I'm sure this is something super easy. Just missing how to get variables to work for me to make coding a lot shorter and easier to update in one spot.
Thanks in advance.
Bookmarks