I have a macro saved to perform VBA codes but it is a master form that I am saving for several items. Each time I save the Workbook, I have to go in and edit the macro with the new Workbook name. Can someone tell me how to edit the macro so it will work as the active Workbook no matter what the file name is?
Thank You.
Sub Hide_All()
'
' Hide_All Macro
' Hide all blank lines
'
' Keyboard Shortcut: Ctrl+Shift+H
'
Application.Run _
"'Detail 090-Engineering & Planning FY16.xlsm'!Expense_Hide"
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("ACTUAL VARIANCES").Select
Application.Run _
"'Detail 090-Engineering & Planning FY16.xlsm'!Actual_Variances"
Sheets("PER VARIANCES").Select
Application.Run _
"'Detail 090-Engineering & Planning FY16.xlsm'!Per_Vairances"
Sheets("TOTALS").Select
Application.Run "'Detail 090-Engineering & Planning FY16.xlsm'!Totals"
End Sub
Bookmarks