It isn't a good idea to have Public procedures in any worksheet's code module. That is because these modules are basically class modules (as is the ThisWorkbook module). The better way is to place your Public sub in a standard code module. You may need to add this to your project. Its default name will be Module1 but you can change that.

Declare your procedure as Sub PerfCompare_Click (without the prefix "Private") in the standard code module and you can call it from any other module, including any class module or even with a keyboard shortcut, just by its name 'PerfCompare_Click'.

Faustulus, you make a valid point. I rarely put any Public procedures inside my Sheet modules, mainly because it makes it harder to locate them when visually scanning around for them (like...where did I put that procedure again? Sheet1, Sheet2, Sheet3, thisWorkbook, oh yeah! Module1, where it should be!) In this case, it seemed like a simple solution to the problem. however, if there is more to it than that, it would be prudent to make a separate module and go forward from there.

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…

The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data.
Rather than update each graph to point to a different set within a static set of data, t…