I've got a series of macros I've written in excel, is there a way of saving the module so it can be loaded into access and run on a newly created spreadsheet?
I'm currenly looking at something like this where the .ManipulateData is the last macro in the module that runs through the others in order
I'm currenly looking at something like this where the .ManipulateData is the last macro in the module that runs through the others in order
Code:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "qryHeatMapFinal_Crosstab", CurrentProject.Path & "\Output\HeatMap output.xls", True, "HeatMapData"
Dim XLApp As Object
' Open the XLS fle, make it visible, get control and run a macro called ManipulateData
Set XLApp = CreateObject("Excel.Application")
With XLApp
.Application.Visible = True
.UserControl = True
.workbooks.Open CurrentProject.Path & "\Output\HeatMap output.xls"
.ManipulateData
.workbooks.Close
'.Quit
.workbooks.Open CurrentProject.Path & "\Output\HeatMap Plot.xls"
End With
Set XLApp = Nothing
Kill CurrentProject.Path & "\Output\HeatMap output(Delete ME).xls"