Hi trevor, thank you.
The code that saves the report is as follows:
Sub SaveReport(StrName As String, wkbreport As Workbook)
Dim StrFile As String
Dim strPath As String
Dim strdate As String
Dim rgLkp As Range
Set rgLkp = Sheets("Report Save").Range("a1").CurrentRegion
StrFile = Application.VLookup(StrName, rgLkp, 3, 0)
strPath = Application.VLookup(StrName, rgLkp, 2, 0)
If Right(strPath, 1) <> "\" Then strPath = strPath & "\"
Select Case Application.VLookup(StrName, rgLkp, 4, 0)
Case "D": strdate = " " & Format(Now(), "yyyymmdd")
Case "DD MMM YYYY": strdate = " " & Format(Now(), "DD MMM YYYY")
Case "M"
If StrName = "OPS (ByAreas)" Then
strdate = " " & Format(Now(), "mmmm yyyy")
Else
strdate = " " & Format(DateAdd("m", (Day(Now()) < 12) * 1, Now()), "mmmm yyyy")
End If
Case Else: strdate = ""
End Select
If StrName = "Group Risk" Then
wkbreport.SaveAs strPath & StrFile & strdate & "r.xls"
wkbreport.Sheets(1).Columns("o:q").Delete
wkbreport.SaveAs strPath & StrFile & strdate & "n.xls"
Workbooks.Open strPath & StrFile & strdate & "r.xls"
ThisWorkbook.Activate
ElseIf StrName = "Non Core" Then
wkbreport.SaveAs strPath & StrFile & strdate & ".xls", FileFormat:=xlNormal, Password:="PassWord"
Else
wkbreport.SaveAs strPath & StrFile & strdate & ".xls"
End If
End Sub
Can I stick the code in here somewhere?