LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Debug problem

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
DeBug Ollie Excel Discussion (Misc queries) 4 April 28th 06 03:17 PM
help with debug Rusty New Users to Excel 3 February 2nd 05 03:16 AM
debug - [email protected] Excel Programming 1 March 6th 04 10:32 AM
Row deletion debug Tom Ogilvy Excel Programming 0 November 14th 03 03:01 PM
debug help Tom Ogilvy Excel Programming 0 August 27th 03 07:10 PM


All times are GMT +1. The time now is 03:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"