Hi,
I am somewhat new to vba. I have this code that works in Excel 2003.
Sub UpdateSysInfo(ByVal SbTtl As Range, ByVal AFfld As Integer)
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
Application.EnableEvents = False
Worksheets("SystemInfoReport").ShowAllData
Worksheets("SystemInfoReport").Range("SysInfoDb").AutoFilter field:=AFfld, Criteria1:="<>"
Application.EnableEvents = True
Worksheets("SystemInfoReport").Calculate
SbTtl.Value = Range("SysInfoAgencyNameSbTtl").Value
End Sub
But fails during compile in Excel 2007 with a Runtime error 1004 for "ShowAllData method of Worksheet class failed" with the following highlighted during debug "Worksheets("SystemInfoReport").ShowAllData"
I have the workbook opened in 'compatablity mode' since it must now work in a 2003 environment, but occasionally do work like this offsite in a 2007 environment.
I have googled and attempted to read up on this but still come up empty, so I would appreciate any help/insights.
Bookmarks