Private Sub Class_Initialize() Set cReports = New Collection cReports.Add rptHTML, "rptHTML" End Sub Public Function printReport(reportName As String) As String Dim strFileName As String, oDataReport As DataReport strFileName = CreateTempFile("rpt") 'need to set oDataReport equal to reportName object reference Set oDataReport = cReports.Item(reportName) oDataReport.ExportReport rptKeyHTML, strFileName, True, False, rptRangeAllPagesNow all I have to do is add the Datareport and one line of code to add it to the collection. Thanks for your help.