Strange button behaviour

User avatar
Steve_in_Kent
4StarLounger
Posts: 419
Joined: 04 Feb 2010, 11:46

Strange button behaviour

Post by Steve_in_Kent »

I have a graph (a whole tab).. have placed a form button on the graph to go back and forth in time. (code behind etc)

however, here's the strange thing.. when i click the button, the button moves to the right, each time.

how can i fix the position of the button ?

Steve
----------------------------------------------------------------------------------------
Owing at LEAST 34 beers to other helpful forum members. Especially HansV!

steveh
SilverLounger
Posts: 1952
Joined: 26 Jan 2010, 12:46
Location: Nr. Heathrow Airport

Re: Strange button behaviour

Post by steveh »

Steve_in_Kent wrote:I have a graph (a whole tab).. have placed a form button on the graph to go back and forth in time. (code behind etc)

however, here's the strange thing.. when i click the button, the button moves to the right, each time.

how can i fix the position of the button ?

Steve
Hi Steve

Does right clicking the button and then setting the move properties to not move or size with cell help?
Steve
http://www.freightpro-uk.com" onclick="window.open(this.href);return false;
“Tell me and I forget, teach me and I may remember, involve me and I learn.”
― Benjamin Franklin

User avatar
HansV
Administrator
Posts: 78488
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Strange button behaviour

Post by HansV »

It's a chart sheet so the "Object positioning" property is not available.

I can reproduce the problem, it looks like a bug to me. A possible workaround is to add code to the macro that is run by the button:

Code: Select all

  With Charts("Chart1").Shapes("Button 1")
    .Top = 10
    .Left = 300
  End With
where Chart1 is the name of the chart sheet and Button 1 is the name of the command button, and with appropriate values for Top and Left.
Best wishes,
Hans

User avatar
Steve_in_Kent
4StarLounger
Posts: 419
Joined: 04 Feb 2010, 11:46

Re: Strange button behaviour

Post by Steve_in_Kent »

Yea, think your right Hans.. excel bug!!! o my

will add the workaround as you suggest...!!

@Steveh. and just for anyone further reading this: Changing anyof the button properties doesn't help.

Steve
----------------------------------------------------------------------------------------
Owing at LEAST 34 beers to other helpful forum members. Especially HansV!