LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Worksheet Change Sub problem

Hello,
I have a problem with Sub Worksheet Change below. Not sure if it is the code
or some system setting.
The problem is that it does not run when changes are made on the sheet it's
attached to. I tried to trace the problem in VB and the sub does not get
activated at all (not just because the condition in the sub is false) - I
tried enable events but it's not it.

Any thoughts of where the problem could be and how to solve it?

Not sure if this matters but I have an XLA attached. The workbook does not
contain any code except the SUB below and all my macros are loaded via
Reference to external XLA module. The funny part is that it worked once or
twice after I wrote it then for some reason, stopped.

Confused
Jack


Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row = 41 And Target.Row <= 42 _
And Target.Column = 10 And Target.Column <= 14 _
Then

ActiveSheet.ChartObjects("Chart 10").Activate

ActiveChart.Axes(xlValue).Select
With ActiveChart.Axes(xlValue)
.MinimumScale = Sheets("Payoff").Range("J42").Value
.MaximumScale = Sheets("Payoff").Range("K42").Value
.MinorUnit = Sheets("Payoff").Range("L42").Value
.MajorUnit = Sheets("Payoff").Range("M42").Value
.Crosses = xlCustom
.CrossesAt = Sheets("Payoff").Range("N42").Value
.ReversePlotOrder = False
.ScaleType = xlLinear
End With

ActiveChart.Axes(xlCategory).Select
With ActiveChart.Axes(xlCategory)
.MinimumScale = Sheets("Payoff").Range("J41").Value
.MaximumScale = Sheets("Payoff").Range("K41").Value
.MinorUnit = Sheets("Payoff").Range("L41").Value
.MajorUnit = Sheets("Payoff").Range("M41").Value
.Crosses = xlCustom
.CrossesAt = Sheets("Payoff").Range("N41").Value
.ReversePlotOrder = False
.ScaleType = xlLinear
End With

Sheets("Payoff").Range("A1").Select
End If
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
how to change the pivot chart automaticaly as values in the worksheet change Vinay Vasu Excel Worksheet Functions 0 May 3rd 10 04:25 PM
Macro change problem Dr Hackenbush Excel Discussion (Misc queries) 3 February 6th 10 04:54 PM
CHANGE MARCO PROBLEM Wu Excel Discussion (Misc queries) 1 November 16th 08 02:34 PM
change formula in a shared worksheet without losing change history DCE Excel Worksheet Functions 5 July 25th 08 01:37 PM
Worksheet Change by Value problem Jim G Excel Discussion (Misc queries) 3 October 2nd 07 12:59 PM


All times are GMT +1. The time now is 05:31 PM.

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"