I have three reports that have start and end dates listed inside the last line of the report. I want to add a macro to my sub routine that will to bold the EndDate to draw attention to it. (See example below)
(Report1)-----Filter Resource Group Names: DF-Clinic; Interval[Ending At]: 12/09/2019 23:59:59; Team Names: DF-Clinic; Interval[Starting At]: 12/09/2019 00:00:00
(Report2)-----Filter Interval[Ending At]: 12/12/2019 23:59:59; Interval[Starting At]: 12/12/2019 00:00:00; CSQ Names: DFClinicCSQ; Interval Length: Thirty(30) Minutes
(Report3)-----Filter Interval[Starting At]: 12/09/2019 00:00:00; Interval[Ending At]: 12/09/2019 23:59:59; CSQ Names: DFClinicCSQ
Then I want to insert this date into the name when I save it. There are a couple of additional problems. The macro that bolds the EndDate is called from the Sub Routine that will save it. And this date uses slashes (/) which will need to be changed to dashes (-). I’m not even sure where to start with this macro. I’ve started the one to bold the date.
Thank you, I really appreciate your help.
Below is part of the first Sub Routine that calls the formatting routine and then saves the excel file to the appropriate folder.
'------------------Calls Sub to Format the Agent Call Summary Report-----------------------------
Call formatACS_Report 'Process Report
'----------Saves the Active Workbook inside the appropriate folder ------------------------------
'-------------------I want to insert EndDate into saved name such as ------12-09-2019 Contact Service Queue Activity Report.xlsx---------------------------
ActiveWorkbook.SaveAs "X:\Telecom\CallReports\PrimaryCare Mail\Agent Call Summary Report.xlsx"
ActiveWorkbook.Close
---------------------------------------------------------------------------------------------------------------------------------
Below is the macro located in the formatting routine that I started which bolds the EndDate
………
………
………
'Find and bold the EndDate located in last row of column A
Dim DateRow As Long
Dim EndDate As Long
'Find the last row in column A
DateRow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row
'Find the End Date listed in the text
????
'Bold the End Date
ActiveSheet.Range("EndDate").Font.Bold = True
(Report1)-----Filter Resource Group Names: DF-Clinic; Interval[Ending At]: 12/09/2019 23:59:59; Team Names: DF-Clinic; Interval[Starting At]: 12/09/2019 00:00:00
(Report2)-----Filter Interval[Ending At]: 12/12/2019 23:59:59; Interval[Starting At]: 12/12/2019 00:00:00; CSQ Names: DFClinicCSQ; Interval Length: Thirty(30) Minutes
(Report3)-----Filter Interval[Starting At]: 12/09/2019 00:00:00; Interval[Ending At]: 12/09/2019 23:59:59; CSQ Names: DFClinicCSQ
Then I want to insert this date into the name when I save it. There are a couple of additional problems. The macro that bolds the EndDate is called from the Sub Routine that will save it. And this date uses slashes (/) which will need to be changed to dashes (-). I’m not even sure where to start with this macro. I’ve started the one to bold the date.
Thank you, I really appreciate your help.
Below is part of the first Sub Routine that calls the formatting routine and then saves the excel file to the appropriate folder.
'------------------Calls Sub to Format the Agent Call Summary Report-----------------------------
Call formatACS_Report 'Process Report
'----------Saves the Active Workbook inside the appropriate folder ------------------------------
'-------------------I want to insert EndDate into saved name such as ------12-09-2019 Contact Service Queue Activity Report.xlsx---------------------------
ActiveWorkbook.SaveAs "X:\Telecom\CallReports\PrimaryCare Mail\Agent Call Summary Report.xlsx"
ActiveWorkbook.Close
---------------------------------------------------------------------------------------------------------------------------------
Below is the macro located in the formatting routine that I started which bolds the EndDate
………
………
………
'Find and bold the EndDate located in last row of column A
Dim DateRow As Long
Dim EndDate As Long
'Find the last row in column A
DateRow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row
'Find the End Date listed in the text
????
'Bold the End Date
ActiveSheet.Range("EndDate").Font.Bold = True