Set oXLApp = CreateObject("Excel.Application")
oXLApp.workbooks.Open "V:\Procurement\Reports\All Suppliers.xls"
oXLApp.Visible = True
The "macro" code in Excel 2003 is as follows:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
'Expand (turn off) all filters on the active worksheet
Dim Fltr As Filter
Dim iFiltr As Integer
For iFiltr = 1 To .Filters.Count
If .Filters(iFiltr).On Then
Unfortunately, it doesn't appear that Access 2007 will allow you to export to an Excel 2007 .xlsm (macro enabled) file format.
Is there some sort of work around that will allow us to export directly to a macro enabled Excel 2007 file or do we need to keep the code in Access 2003 format in our converted Access 2007 database to export to the Excel 2003 file format and then not
convert the spreadsheets to up to Excel 2007? The Excel file is overwritten on a monthly basis but we want to keep the format and the filters.
Thursday, August 05, 2010 9:29 PM
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.