Hi Sibilia,
If you are using an ActiveX CommandButton, make sure you have its
TakeFocusOnClick property set to False.
--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/
* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm
"Sibilia" wrote in
message ...
Great! :) It works!!!! but as the graph got x and Y Axis, I tried to
use the same code for the second axis ; So the code becomes:
With Sheets("Incidence")
ChartObjects("Chart 32").Chart.SeriesCollection(1).XValues = _
Range(.Cells(StartLine, "W"), .Cells(EndLine, "W"))
ChartObjects("Chart 32").Chart.SeriesCollection(1).Values = _
Range(.Cells(StartLine, "X"), .Cells(EndLine, "X"))
End With
But when I do this using F8, it is ok , it works. But when I link the
macro to a button then it stops with this message: Type mismatch.
Don't know what to do ... .
Many thanks anyway!
--
Sibilia
------------------------------------------------------------------------
Sibilia's Profile:
http://www.excelforum.com/member.php...o&userid=21363
View this thread: http://www.excelforum.com/showthread...hreadid=383839