What isn't 2003 compatible?

bcurrey

Board Regular
Joined
Aug 11, 2011
Messages
110
Office Version
  1. 365
Platform
  1. MacOS
I built this in 2007, but found out after the fact that my company's servers only run 2003. :confused::confused::confused:

The servers won't process this because of an error, but it works in 2007. Can someone look at it and tell me if they see anything that might not be compatible? Thanks!


Code:
Sub Auto_Open()
'
' Macro3 Macro
'

'
Workbooks.Open Filename:="D:\pbs\temp\q1.xls"

'*** BASED ON QUERY 818 ****


 Range("B1").Select
    Sheets.Add After:=Sheets(Sheets.Count)
    Sheets("Query NO 818").Select
    Selection.AutoFilter
    ActiveSheet.Range("$A$1:$AX$600").AutoFilter Field:=2, Criteria1:= _
        xlFilterToday, Operator:=xlFilterDynamic
    Cells.Select
    Selection.Copy
    Sheets("Sheet1").Select
    ActiveSheet.Paste
    Range("F12").Select
    
       Range("C2").Select
    ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Clear
    ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Add Key:=Range("C2"), _
        SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
        xlSortTextAsNumbers
    With ActiveWorkbook.Worksheets("Sheet1").Sort
        .SetRange Range("A2:AX11")
        .Header = xlNo
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With
    Range("D2:D11").Select
    Selection.Copy
    Range("D17").Select
    ActiveSheet.Paste
    Range("F2:F11").Select
    Application.CutCopyMode = False
    Selection.Copy
    Range("F17").Select
    ActiveSheet.Paste
    Range("H2:H11").Select
    Application.CutCopyMode = False
    Selection.Copy
    Range("H17").Select
    ActiveSheet.Paste
    Range("C17:C26").Select
    Application.CutCopyMode = False
    Selection.NumberFormat = "h:mm"
    Range("C17").Select
    ActiveCell.FormulaR1C1 = "1/6/1900  12:00:00 AM"
    Range("C17").Select
    ActiveCell.FormulaR1C1 = "6:00"
    Range("C18").Select
    ActiveCell.FormulaR1C1 = "8:00"
    Range("C18").Select
    Selection.AutoFill Destination:=Range("C18:C19"), Type:=xlFillDefault
    Range("C18:C19").Select
    Selection.AutoFill Destination:=Range("C18:C25"), Type:=xlFillDefault
    Range("C18:C25").Select
    Selection.AutoFill Destination:=Range("C18:C26"), Type:=xlFillDefault
    Range("C18:C26").Select
    Selection.AutoFill Destination:=Range("C18:C27"), Type:=xlFillDefault
    Range("C18:C27").Select
    Range("C27").Select
    ActiveCell.FormulaR1C1 = "6:00:00 PM"
    Range("C28").Select
    ActiveSheet.Shapes.AddChart.Select
    ActiveChart.SetSourceData Source:=Range("'Sheet1'!$C$17:$D$27")
    ActiveChart.ChartType = xlLineMarkers
    ActiveChart.Legend.Select
    Selection.Delete
    ActiveChart.ClearToMatchStyle
    ActiveChart.ChartStyle = 41
    ActiveChart.ClearToMatchStyle
    Range("A17").Select
    ActiveCell.FormulaR1C1 = "500"
    Range("B17").Select
    ActiveCell.FormulaR1C1 = "1/19/1902  12:00:00 AM"
    Range("A17").Select
    Selection.Copy
    Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
        SkipBlanks:=False, Transpose:=False
    Application.CutCopyMode = False
    Range("A17:B17").Select
    Range("B17").Activate
    Selection.Copy
    Range("A18:B27").Select
    ActiveSheet.Paste
    ActiveSheet.ChartObjects("Chart 1").Activate
    ActiveSheet.ChartObjects("Chart 1").Activate
    ActiveChart.SeriesCollection.NewSeries
    ActiveChart.SeriesCollection(2).Values = "='Sheet1'!$A$17:$A$27"
    ActiveChart.SeriesCollection.NewSeries
    ActiveChart.SeriesCollection(3).Values = "='Sheet1'!$B$17:$B$27"
    ActiveSheet.ChartObjects("Chart 1").Activate
    ActiveChart.SeriesCollection(3).Select
    ActiveSheet.ChartObjects("Chart 1").Activate
    ActiveChart.SeriesCollection(3).ChartType = xlLine
    ActiveChart.SeriesCollection(2).Select
    ActiveSheet.ChartObjects("Chart 1").Activate
    ActiveChart.SeriesCollection(2).ChartType = xlLine
    
    ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.SeriesCollection(2).Border.ColorIndex = 10
ActiveChart.SeriesCollection(3).Border.ColorIndex = 6




'********************SIZES CHART************************

ActiveChart.Parent.Name = "Chart 1"

ActiveChart.ChartArea.Font.Size = 14

With Range("F14:Q38")
    ActiveChart.Parent.Left = .Left
    ActiveChart.Parent.Top = .Top
    ActiveChart.Parent.Width = .Width
    ActiveChart.Parent.Height = .Height
End With

'********************************************************


    Range("D17:H27").Select
    Selection.Style = "Comma"
    Selection.NumberFormat = "_(* #,##0_);_(* (#,##0);_(* ""-""??_);_(@_)"


'**************SAVES CHARTS AS IMAGE ***************************


 ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.Export "D:\data\fci_queries\Real Time Stats\Dashboard\backlog_chart_nm.png"



    Application.DisplayAlerts = False

 ActiveWorkbook.SaveAs Filename:="D:\data\fci_queries\Real Time Stats\Dashboard\backlog2.xls", FileFormat:=xlNormal, _
        Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
        CreateBackup:=False

    Application.Quit
End Sub
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
The sort method is new and different in Excel 2007, but the 2003 method still works. Record a macro in 2003.
 
Upvote 0
That's the problem, I don't have access to a 2003 version. Think if I remove the sort in this it might work?
 
Upvote 0
The easiest way to find out is to try it.
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,717
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top