Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Compiler Error - Named Argument Not Found
I wrote a fairly elaborate spreadsheet with macros
throughtout. It was written in Excel 2002 v10.4524.4219 SP-2. I have transferred it to the other users in our office running Excel 2000 v9.0.6926 SP-3. We are seeing "Compile Error" "Named argument Not Found" when try to run the macros. The debugger stops on "DataOption1:=". Please tell me if any steps are available to fix this without having to rewrite the spreadsheet in a lower version and Where I can find the proper syntax for other errors that may occur after this one is fixed. Many thanks Chris C. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Compiler Error - Named Argument Not Found
Chris,
Post the line of code that is causing the error. -- Cordially, Chip Pearson Microsoft MVP - Excel www.cpearson.com "Chris" wrote in message ... I wrote a fairly elaborate spreadsheet with macros throughtout. It was written in Excel 2002 v10.4524.4219 SP-2. I have transferred it to the other users in our office running Excel 2000 v9.0.6926 SP-3. We are seeing "Compile Error" "Named argument Not Found" when try to run the macros. The debugger stops on "DataOption1:=". Please tell me if any steps are available to fix this without having to rewrite the spreadsheet in a lower version and Where I can find the proper syntax for other errors that may occur after this one is fixed. Many thanks Chris C. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Compiler Error - Named Argument Not Found
Hi Chris,
The only way to make this work reliably is to always do your final compile and save in the earliest version of Excel that you plan to run your program under. There were a number of Excel methods that were updated with additional arguments between Excel 2000 and Excel 2002. If you don't recognize the argument that's causing the problem and what it does, then it's typically safe to assume that you can simply remove it. This will eliminate the problem in Excel 2000 and that argument will simply assume its default behavior in Excel 2002 (which is compatible with Excel 2000 in all cases that I've come across). -- Rob Bovey, MCSE, MCSD, Excel MVP Application Professionals http://www.appspro.com/ * Please post all replies to this newsgroup * * I delete all unsolicited e-mail responses * "Chris" wrote in message ... I wrote a fairly elaborate spreadsheet with macros throughtout. It was written in Excel 2002 v10.4524.4219 SP-2. I have transferred it to the other users in our office running Excel 2000 v9.0.6926 SP-3. We are seeing "Compile Error" "Named argument Not Found" when try to run the macros. The debugger stops on "DataOption1:=". Please tell me if any steps are available to fix this without having to rewrite the spreadsheet in a lower version and Where I can find the proper syntax for other errors that may occur after this one is fixed. Many thanks Chris C. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Compiler Error - Named Argument Not Found
Chip,
Here it is. It hangs on the sort when it hits the DataOption1:= please note that everything works like a charm in Excel 2002. Range("=Offset(I4,,,CountA(I:I),-9)").Sort Key1:=Range ("A4"), Order1:=xlAscending, Key2:=Range _ ("B4"), Order2:=xlAscending, Key3:=Range("H4"), Order3:=xlAscending, _ Header:=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:= _ xlTopToBottom, DataOption1:=xlSortNormal, DataOption2:=xlSortNormal, _ DataOption3:=xlSortNormal Thanks for looking. Chris -----Original Message----- Chris, Post the line of code that is causing the error. -- Cordially, Chip Pearson Microsoft MVP - Excel www.cpearson.com "Chris" wrote in message ... I wrote a fairly elaborate spreadsheet with macros throughtout. It was written in Excel 2002 v10.4524.4219 SP-2. I have transferred it to the other users in our office running Excel 2000 v9.0.6926 SP-3. We are seeing "Compile Error" "Named argument Not Found" when try to run the macros. The debugger stops on "DataOption1:=". Please tell me if any steps are available to fix this without having to rewrite the spreadsheet in a lower version and Where I can find the proper syntax for other errors that may occur after this one is fixed. Many thanks Chris C. . |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Compiler Error - Named Argument Not Found
Chip,
Thanks, it fixed that one but now it stops on PrintQuality = 600 which may be unique to the print setup. If so, how can I make this work universally. The other hang up is on the line: ..PrintErrors = xlPrintErrorsDisplayed But if delete it everything goes okay. The one I can't get is how to make the PrintQuality a universal setting. My whole routine is as follows: Sub Print_Man_Hours_by_Division_Report() ' ' Print_Man_Hours_by_Division_Report Macro ' Macro recorded 9/4/2003 by J. Christopher Cantele ' ' Make sure the TimeSheet Sheet is active Sheets("TimeSheet").Activate ' Range("A4").Select Selection.RemoveSubtotal Range("=Offset(I4,,,CountA(I:I),-9)").Sort Key1:=Range ("F4"), Order1:=xlAscending, Key2:=Range _ ("H4"), Order2:=xlAscending, Key3:=Range("B4"), Order3:=xlAscending, _ Header:=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:= _ xlTopToBottom Selection.Subtotal GroupBy:=6, Function:=xlSum, TotalList:=Array(9), _ Replace:=True, PageBreaks:=False, SummaryBelowData:=True 'Set up Page Range("A4").Select With ActiveSheet.PageSetup .PrintTitleRows = "$1:$3" .PrintTitleColumns = "" End With ActiveSheet.PageSetup.PrintArea = "" With ActiveSheet.PageSetup .LeftHeader = "" .CenterHeader = _ "&""Times New Roman,Bold""&16QCI Marine Offshore Man Hours by Division&""Times New Roman,Regular""&10" & Chr(10) & "" .RightHeader = "" .LeftFooter = "&D" .CenterFooter = "Page &P of &N" .RightFooter = "" .LeftMargin = Application.InchesToPoints(0.5) .RightMargin = Application.InchesToPoints(0.5) .TopMargin = Application.InchesToPoints(0.57) .BottomMargin = Application.InchesToPoints(0.75) .HeaderMargin = Application.InchesToPoints(0.25) .FooterMargin = Application.InchesToPoints(0.25) .PrintHeadings = False .PrintGridlines = False .PrintComments = xlPrintNoComments .PrintQuality = 600 .CenterHorizontally = True .CenterVertically = False .Orientation = xlLandscape .Draft = False .PaperSize = xlPaperLetter .FirstPageNumber = xlAutomatic .Order = xlDownThenOver .BlackAndWhite = False .Zoom = 78 .PrintErrors = xlPrintErrorsDisplayed End With ActiveSheet.PageSetup.PrintArea = "=Offset(I1,,,CountA (I:I),-9)" ActiveSheet.PrintPreview End Sub -----Original Message----- Chris, The DataOption arguments were added in Excel 2002, so they won't work in Excel 2000. Omit the arguments. -- Cordially, Chip Pearson Microsoft MVP - Excel www.cpearson.com "Chris" wrote in message ... Chip, Here it is. It hangs on the sort when it hits the DataOption1:= please note that everything works like a charm in Excel 2002. Range("=Offset(I4,,,CountA(I:I),-9)").Sort Key1:=Range ("A4"), Order1:=xlAscending, Key2:=Range _ ("B4"), Order2:=xlAscending, Key3:=Range("H4"), Order3:=xlAscending, _ Header:=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:= _ xlTopToBottom, DataOption1:=xlSortNormal, DataOption2:=xlSortNormal, _ DataOption3:=xlSortNormal Thanks for looking. Chris -----Original Message----- Chris, Post the line of code that is causing the error. -- Cordially, Chip Pearson Microsoft MVP - Excel www.cpearson.com "Chris" wrote in message ... I wrote a fairly elaborate spreadsheet with macros throughtout. It was written in Excel 2002 v10.4524.4219 SP-2. I have transferred it to the other users in our office running Excel 2000 v9.0.6926 SP-3. We are seeing "Compile Error" "Named argument Not Found" when try to run the macros. The debugger stops on "DataOption1:=". Please tell me if any steps are available to fix this without having to rewrite the spreadsheet in a lower version and Where I can find the proper syntax for other errors that may occur after this one is fixed. Many thanks Chris C. . . |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Compiler Error - Named Argument Not Found
Hi Chris,
The PrintQuality setting has been around for a long time, so that one is not an Excel version problem. However, some printers don't support this setting, so that may be the problem you're running into. Since 600 is the default value for this property, it looks to me like you can remove this setting as well without any problems. -- Rob Bovey, MCSE, MCSD, Excel MVP Application Professionals http://www.appspro.com/ * Please post all replies to this newsgroup * * I delete all unsolicited e-mail responses * "Chris" wrote in message ... Chip, Thanks, it fixed that one but now it stops on PrintQuality = 600 which may be unique to the print setup. If so, how can I make this work universally. The other hang up is on the line: .PrintErrors = xlPrintErrorsDisplayed But if delete it everything goes okay. The one I can't get is how to make the PrintQuality a universal setting. My whole routine is as follows: Sub Print_Man_Hours_by_Division_Report() ' ' Print_Man_Hours_by_Division_Report Macro ' Macro recorded 9/4/2003 by J. Christopher Cantele ' ' Make sure the TimeSheet Sheet is active Sheets("TimeSheet").Activate ' Range("A4").Select Selection.RemoveSubtotal Range("=Offset(I4,,,CountA(I:I),-9)").Sort Key1:=Range ("F4"), Order1:=xlAscending, Key2:=Range _ ("H4"), Order2:=xlAscending, Key3:=Range("B4"), Order3:=xlAscending, _ Header:=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:= _ xlTopToBottom Selection.Subtotal GroupBy:=6, Function:=xlSum, TotalList:=Array(9), _ Replace:=True, PageBreaks:=False, SummaryBelowData:=True 'Set up Page Range("A4").Select With ActiveSheet.PageSetup .PrintTitleRows = "$1:$3" .PrintTitleColumns = "" End With ActiveSheet.PageSetup.PrintArea = "" With ActiveSheet.PageSetup .LeftHeader = "" .CenterHeader = _ "&""Times New Roman,Bold""&16QCI Marine Offshore Man Hours by Division&""Times New Roman,Regular""&10" & Chr(10) & "" .RightHeader = "" .LeftFooter = "&D" .CenterFooter = "Page &P of &N" .RightFooter = "" .LeftMargin = Application.InchesToPoints(0.5) .RightMargin = Application.InchesToPoints(0.5) .TopMargin = Application.InchesToPoints(0.57) .BottomMargin = Application.InchesToPoints(0.75) .HeaderMargin = Application.InchesToPoints(0.25) .FooterMargin = Application.InchesToPoints(0.25) .PrintHeadings = False .PrintGridlines = False .PrintComments = xlPrintNoComments .PrintQuality = 600 .CenterHorizontally = True .CenterVertically = False .Orientation = xlLandscape .Draft = False .PaperSize = xlPaperLetter .FirstPageNumber = xlAutomatic .Order = xlDownThenOver .BlackAndWhite = False .Zoom = 78 .PrintErrors = xlPrintErrorsDisplayed End With ActiveSheet.PageSetup.PrintArea = "=Offset(I1,,,CountA (I:I),-9)" ActiveSheet.PrintPreview End Sub |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Compiler Error - Named Argument Not Found
If you're not changing something in that print setup portion, comment it out (or
just delete it). It'll make your macro a little faster (since it does less), too. Chris wrote: Chip, Thanks, it fixed that one but now it stops on PrintQuality = 600 which may be unique to the print setup. If so, how can I make this work universally. The other hang up is on the line: .PrintErrors = xlPrintErrorsDisplayed But if delete it everything goes okay. The one I can't get is how to make the PrintQuality a universal setting. My whole routine is as follows: Sub Print_Man_Hours_by_Division_Report() ' ' Print_Man_Hours_by_Division_Report Macro ' Macro recorded 9/4/2003 by J. Christopher Cantele ' ' Make sure the TimeSheet Sheet is active Sheets("TimeSheet").Activate ' Range("A4").Select Selection.RemoveSubtotal Range("=Offset(I4,,,CountA(I:I),-9)").Sort Key1:=Range ("F4"), Order1:=xlAscending, Key2:=Range _ ("H4"), Order2:=xlAscending, Key3:=Range("B4"), Order3:=xlAscending, _ Header:=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:= _ xlTopToBottom Selection.Subtotal GroupBy:=6, Function:=xlSum, TotalList:=Array(9), _ Replace:=True, PageBreaks:=False, SummaryBelowData:=True 'Set up Page Range("A4").Select With ActiveSheet.PageSetup .PrintTitleRows = "$1:$3" .PrintTitleColumns = "" End With ActiveSheet.PageSetup.PrintArea = "" With ActiveSheet.PageSetup .LeftHeader = "" .CenterHeader = _ "&""Times New Roman,Bold""&16QCI Marine Offshore Man Hours by Division&""Times New Roman,Regular""&10" & Chr(10) & "" .RightHeader = "" .LeftFooter = "&D" .CenterFooter = "Page &P of &N" .RightFooter = "" .LeftMargin = Application.InchesToPoints(0.5) .RightMargin = Application.InchesToPoints(0.5) .TopMargin = Application.InchesToPoints(0.57) .BottomMargin = Application.InchesToPoints(0.75) .HeaderMargin = Application.InchesToPoints(0.25) .FooterMargin = Application.InchesToPoints(0.25) .PrintHeadings = False .PrintGridlines = False .PrintComments = xlPrintNoComments .PrintQuality = 600 .CenterHorizontally = True .CenterVertically = False .Orientation = xlLandscape .Draft = False .PaperSize = xlPaperLetter .FirstPageNumber = xlAutomatic .Order = xlDownThenOver .BlackAndWhite = False .Zoom = 78 .PrintErrors = xlPrintErrorsDisplayed End With ActiveSheet.PageSetup.PrintArea = "=Offset(I1,,,CountA (I:I),-9)" ActiveSheet.PrintPreview End Sub -----Original Message----- Chris, The DataOption arguments were added in Excel 2002, so they won't work in Excel 2000. Omit the arguments. -- Cordially, Chip Pearson Microsoft MVP - Excel www.cpearson.com "Chris" wrote in message ... Chip, Here it is. It hangs on the sort when it hits the DataOption1:= please note that everything works like a charm in Excel 2002. Range("=Offset(I4,,,CountA(I:I),-9)").Sort Key1:=Range ("A4"), Order1:=xlAscending, Key2:=Range _ ("B4"), Order2:=xlAscending, Key3:=Range("H4"), Order3:=xlAscending, _ Header:=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:= _ xlTopToBottom, DataOption1:=xlSortNormal, DataOption2:=xlSortNormal, _ DataOption3:=xlSortNormal Thanks for looking. Chris -----Original Message----- Chris, Post the line of code that is causing the error. -- Cordially, Chip Pearson Microsoft MVP - Excel www.cpearson.com "Chris" wrote in message ... I wrote a fairly elaborate spreadsheet with macros throughtout. It was written in Excel 2002 v10.4524.4219 SP-2. I have transferred it to the other users in our office running Excel 2000 v9.0.6926 SP-3. We are seeing "Compile Error" "Named argument Not Found" when try to run the macros. The debugger stops on "DataOption1:=". Please tell me if any steps are available to fix this without having to rewrite the spreadsheet in a lower version and Where I can find the proper syntax for other errors that may occur after this one is fixed. Many thanks Chris C. . . -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VLOOKUP with a Named Range argument | Excel Worksheet Functions | |||
2003 macro generates compiler error on 2007 | Excel Worksheet Functions | |||
Compiler Error - Not an Appropriate Name | Excel Discussion (Misc queries) | |||
Compiler Error | Excel Discussion (Misc queries) | |||
Why Am I Getting the "Named Argument Not Found" Warning? | Excel Discussion (Misc queries) |