Currently I have a singular macro that can be utilized across 6 different sheets, however, what I don't want to have to do is create 6 of the same macro and each is roughly 100+ lines. To simply for the sake of this thread, if a button is pressed I have an If Then statement setup to check to see if the code matches a cell value. If it matches then what I would ideally like for it to do is run the macro with the specific sheet in mind.
Here is a very basic version of the code that I am currently trying to hash out:
When I run it currently it keeps returning an error 'Object Required' which I attribute as to the 'Set wk =' not carrying over to the subroutine. Is there a way to call it in the sub routine or is it something that needs to be declared for each routine that is ran?
Bookmarks