Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a line chart. When I change some specific values, a
macro is executed automatically. It changes the minimum and maximum values on the horizontal axis, and also the number format: ..MinimumScale=... ..MaximumScale=... ..TickLabels.NumberFormat=... But then, the rectangle containing the legends moves. A few pixels up, or to the left. Every time. In the Format Legent screen, Placement tab, "Right" is marked, and stays marked. I suppose the macro is responsible, but I am not sure. How do I fix that ? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sinus Log wrote:
I have a line chart. When I change some specific values, a macro is executed automatically. It changes the minimum and maximum values on the horizontal axis, and also the number format: .MinimumScale=... .MaximumScale=... .TickLabels.NumberFormat=... But then, the rectangle containing the legends moves. A few pixels up, or to the left. Every time. In the Format Legent screen, Placement tab, "Right" is marked, and stays marked. I suppose the macro is responsible, but I am not sure. How do I fix that ? Small error I made in my first post: it's an XY (Scatter) chart. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I could not reproduce the problem from your description, although I have seen it in the past. Why not read the top and left properties of the legend at the beginning of your macro and set them at the end if they have changed. Cheers Andy Sinus Log wrote: I have a line chart. When I change some specific values, a macro is executed automatically. It changes the minimum and maximum values on the horizontal axis, and also the number format: .MinimumScale=... .MaximumScale=... .TickLabels.NumberFormat=... But then, the rectangle containing the legends moves. A few pixels up, or to the left. Every time. In the Format Legent screen, Placement tab, "Right" is marked, and stays marked. I suppose the macro is responsible, but I am not sure. How do I fix that ? -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Can you email me the file, do not attached to this newsgroup. I haven't seen this when the numbers in cells where modified and as I said I can not get you code to re create the problem. Cheers Andy Sinus Log wrote: Andy Pope wrote: Hi, I could not reproduce the problem from your description, although I have seen it in the past. Why not read the top and left properties of the legend at the beginning of your macro and set them at the end if they have changed. Cheers Andy How do I do that ? It took me a couple of hours to figure out how to program the number format. Could you tell me how to modify my code, please ? With graphique.Chart.Axes(xlCategory) .MinimumScale = premPointComp .MaximumScale = dernPointComp .TickLabels.NumberFormat = formatNombres End With Thanks for your reply PS: More on the symptoms There's no problem until the macro is executed. The problem shows afterwards when I modify a cell, even if that doesn't trigger the macro. -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Andy Pope wrote:
Hi, I could not reproduce the problem from your description, although I have seen it in the past. Why not read the top and left properties of the legend at the beginning of your macro and set them at the end if they have changed. Cheers Andy How do I do that ? It took me a couple of hours to figure out how to program the number format. Could you tell me how to modify my code, please ? With graphique.Chart.Axes(xlCategory) .MinimumScale = premPointComp .MaximumScale = dernPointComp .TickLabels.NumberFormat = formatNombres End With Thanks for your reply PS: More on the symptoms There's no problem until the macro is executed. The problem shows afterwards when I modify a cell, even if that doesn't trigger the macro. |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Andy Pope wrote:
Hi, Can you email me the file, do not attached to this newsgroup. I haven't seen this when the numbers in cells where modified and as I said I can not get you code to re create the problem. Cheers Andy Sinus Log wrote: Andy Pope wrote: Hi, I could not reproduce the problem from your description, although I have seen it in the past. Why not read the top and left properties of the legend at the beginning of your macro and set them at the end if they have changed. Cheers Andy How do I do that ? It took me a couple of hours to figure out how to program the number format. Could you tell me how to modify my code, please ? With graphique.Chart.Axes(xlCategory) .MinimumScale = premPointComp .MaximumScale = dernPointComp .TickLabels.NumberFormat = formatNombres End With Thanks for your reply PS: More on the symptoms There's no problem until the macro is executed. The problem shows afterwards when I modify a cell, even if that doesn't trigger the macro. Thanks, Andy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Chart moves on plot area when adding a third month | Charts and Charting in Excel | |||
position of chart on page moves when outline expands | Charts and Charting in Excel | |||
add legend to chart | Charts and Charting in Excel | |||
Bar Chart Legend Key | Charts and Charting in Excel | |||
chart legen moves! | Charts and Charting in Excel |