![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Location: Boston, MA
Posts: 105
|
Is there some reason why everytime I get to the line that names a new sheet for a chart I get some error that immediately ends the sub-routine? No dialog box or anything; it just skips the rest of the routine and exits the Sub. Here's the code:
Selection.Activate Charts.Add ActiveChart.ChartType = xl3DArea ActiveChart.SetSourceData Source:=Sheets("WIP2").Range("B" & LastRow + 1 & ":" & RightFill), PlotBy:= _ xlRows ActiveChart.SeriesCollection(1).XValues = "=WIP2!R1C2:R1C50" If LoanBorrow = "LOANS" Then ActiveChart.Location Where:=xlLocationAsNewSheet, Name:="Monthly Average Loans" 'Right here it breaks off ElseIf LoanBorrow = "BORROWS" Then ActiveChart.Location Where:=xlLocationAsNewSheet, Name:="Monthly Average Borrows" End If With ActiveChart .HasTitle = True .ChartTitle.Characters.text = "Average Monthly Nominals For " & Client & " For The Past " & MnthAvgCount & " Months" .Axes(xlCategory).HasTitle = False .Axes(xlSeries).HasTitle = False .Axes(xlValue).HasTitle = True .Axes(xlValue).AxisTitle.Characters.text = "Average Nominals (€000)" End With |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Millbank, London, UK
Posts: 1,790
|
I'll just send this to the top of the list with a "is that a Euro symbol" comment....
Is that a Euro symbol ? Maybe this will trigger something with the VBA experts....
__________________
:: Pharma Z - Family drugstore :: |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Location: Boston, MA
Posts: 105
|
Yes indeed, that is a Euro symbol, but that can't be the problem as (a) it's just in the axis title as text" and (b) it's not the axis title that has the error, it's the chart title.
Any other ideas? |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|