View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Kained Kained is offline
external usenet poster
 
Posts: 6
Default Ticklabel problem

Hi there,

Am having touble changing the ticklable number format based on the
contents of a cell(ie P for percent, N for number) using the change
event.

Here is what I have. I cant see any wrong with it, but any advice is
warmly welcome.

Private Sub Worksheet_Change(ByVal Target As Range)
graphtype = Range("C49").Value

With ActiveSheet.ChartObjects("Chart 2").Chart

Select Case graphtype
Case "P"
.Axis(xlValue).TickLabels.NumberFormat = "0%;[Red](0%)"
Case "N"
.Axis(xlValue).TickLabels.NumberFormat =
"#,##0;[Red](#,##0)"
End Select

End With

End Sub

regards,

david