I am completely new to creating macros/editing vba in Excel 2010, so please be patient with my question. I have written a macro, edited it and it works in any workbook I open when I run the macro from the Developer toolbar. I have saved the macro in its own excel file and have created a button to assign the macro to it. However, I am needing to share this macro so other users can open the xlsm file, click the button that has the macro assigned to it and then have the macro run on the other active workbook. We have over 140 different workbooks that we may or may not want to run the macro on, so I cannot specify the name of the workbook to run the macro on. Below is the beginning part of my macro (as it is pretty long), but I know I need to write something at the beginning that tells the macro to run on the other active workbook. I am at a loss as this is probably way above my skill level since this is my first macro to ever write. Any help is greatly appreciated
Sub diag_macro_test2()
'
' diag_macro_test2 Macro
'
'
Sheets("Sheet2").Select
Range("D1:H1").Select
Range(Selection, Selection.End(xlDown)).Select
Sub diag_macro_test2()
'
' diag_macro_test2 Macro
'
'
Sheets("Sheet2").Select
Range("D1:H1").Select
Range(Selection, Selection.End(xlDown)).Select