Dan Wilson
Well-known Member
- Joined
- Feb 5, 2006
- Messages
- 507
- Office Version
- 365
- Platform
- Windows
Good day. I am running Excel 2018 on Windows 10 Pro. I have a Workbook containing 7 worksheets. One of the worksheets contains buttons that are attached to Macros. After creating all the necessary Macros to sort the worksheets by Date, Name, Percentage, etc., I realized that each of the sorts prints out a generic Header. I then created more Macros to do nothing more than change the header on a given worksheet according to the sort method. Those Macros work perfectly. I then attempted to include the header macros into the sort macros so that when a sort by Date is done, the Header will identify the printed page as “XXXX by Date” with XXXX being the worksheet name. I tried adding the Call statement prior to the “End Sub” but that didn’t work. I moved the Call statement to the first line of command text in the macro, but that didn’t work either. One of the worksheets contains a macro that contains only Call statements to execute a generic sort of the other worksheets. This macro contains only Call statements and it works fine. What am I doing wrong here? Any help will be appreciated.
Thank you, Dan Wilson…
Thank you, Dan Wilson…