Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi James,
There seems to be some confusion here. The error is on the line Call PrintMacro(PrintOrder) and there is no sub called PrintMacro. You do have an array caled PrintMacro, which holds 11 stringd, presumably what you are trying to process. You probably have another sub called something else, let's call ChartSetup now, and the sub call should be something like Call ChartSetup(PrintMacro(PrintOrder)) -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "James L" wrote in message ... Hello, The code below will not compile. It say 'Expected Sub, Function or Property' I can't see the problem? Thanks in advance, James Option Explicit Sub OptionsPrintPack() Dim PrintOrder As Integer Dim PrintTitle(11) PrintTitle(1) = "Ethnic Profile by Gender" PrintTitle(2) = "Ethnic Profile by Gender by Site" PrintTitle(3) = "Ethnic Profile by Gender by Role" PrintTitle(4) = "Years fo Service" PrintTitle(5) = "Years of Service by Site" PrintTitle(6) = "Average Age by Site, By Gender, by Age" PrintTitle(7) = "Average Age Profile by Site" PrintTitle(8) = "Total Salary By Site" PrintTitle(9) = "Average Salary by Site and Gender" PrintTitle(10) = "Average Managers Salary by Site and Gender" PrintTitle(11) = "Basic Salary shown in a Range" Dim PrintMacro(11) PrintMacro(1) = "CreateEthnicProfileByGender" PrintMacro(2) = "CreateEthnicProfileByGenderBySite" PrintMacro(3) = "CreateEthnicProfileByGenderByRole" PrintMacro(4) = "CreateYearsOfServiceProfile" PrintMacro(5) = "CreateServiceProfileBySite" PrintMacro(6) = "CreateAvAgeBySiteByGenderbyAge" PrintMacro(7) = "CreateAgeProfileBySite" PrintMacro(8) = "CreateTotalBasicSalaryBySite" PrintMacro(9) = "CreateAverageBasicSalaryBySiteAndGender" PrintMacro(10) = "CreateMgtBasicSalaryBySiteByGender" PrintMacro(11) = "CreateBasicSalaryByRange" For PrintOrder = 1 To 11 Sheets("PivotChart").Select Call PrintMacro(PrintOrder) Next PrintOrder ' Application.Dialogs(xlDialogPrint).Show ' choose printer End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
DeBug | Excel Discussion (Misc queries) | |||
help with debug | New Users to Excel | |||
debug - | Excel Programming | |||
Row deletion debug | Excel Programming | |||
debug help | Excel Programming |