Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 349
Default CommandButton objects move in worksheet

Hello,

Maybe someone has a hint for me whats wrong here :-)
I have written some VBA code that allows to expand/collapse a previously
grouped set of rows dependent of the state of a checkbox object. Works fine
sofar. Then I have placed a CommandButton within that group, used the
TopLeftCell Property to decide if the button is within the group range and if
yes, hide the CommandButton when collapsing the group with the .visible
property. Still works fine. The problem occurs if I save and close the
worksheet while the respective group is collapsed (showDetail property =
false). If I do this, after re-opening the workbook the CommandButton has
changed its position, obviously messing up the worksheet layout completely.
I have to confess I am a VBA newbie, maybe I have a fundamental conceptual
error here- or is this simply a strange excel behavior?
Any help or hint would be much appreciated!!

Thanks
peter

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,316
Default CommandButton objects move in worksheet

Open the Control Toolbox toolbar, click on the design button, right-click on
your command button and select "Format Control". Click on the properties tab
in the dialog box and click the "Don't move or size with cells" option button.

--
Kevin Backmann


"peter" wrote:

Hello,

Maybe someone has a hint for me whats wrong here :-)
I have written some VBA code that allows to expand/collapse a previously
grouped set of rows dependent of the state of a checkbox object. Works fine
sofar. Then I have placed a CommandButton within that group, used the
TopLeftCell Property to decide if the button is within the group range and if
yes, hide the CommandButton when collapsing the group with the .visible
property. Still works fine. The problem occurs if I save and close the
worksheet while the respective group is collapsed (showDetail property =
false). If I do this, after re-opening the workbook the CommandButton has
changed its position, obviously messing up the worksheet layout completely.
I have to confess I am a VBA newbie, maybe I have a fundamental conceptual
error here- or is this simply a strange excel behavior?
Any help or hint would be much appreciated!!

Thanks
peter

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 349
Default CommandButton objects move in worksheet

Hi Kevin,

Thanks for the answer, but unfortunately it doesn´t solve the issue...

peter

"Kevin B" wrote:

Open the Control Toolbox toolbar, click on the design button, right-click on
your command button and select "Format Control". Click on the properties tab
in the dialog box and click the "Don't move or size with cells" option button.

--
Kevin Backmann


"peter" wrote:

Hello,

Maybe someone has a hint for me whats wrong here :-)
I have written some VBA code that allows to expand/collapse a previously
grouped set of rows dependent of the state of a checkbox object. Works fine
sofar. Then I have placed a CommandButton within that group, used the
TopLeftCell Property to decide if the button is within the group range and if
yes, hide the CommandButton when collapsing the group with the .visible
property. Still works fine. The problem occurs if I save and close the
worksheet while the respective group is collapsed (showDetail property =
false). If I do this, after re-opening the workbook the CommandButton has
changed its position, obviously messing up the worksheet layout completely.
I have to confess I am a VBA newbie, maybe I have a fundamental conceptual
error here- or is this simply a strange excel behavior?
Any help or hint would be much appreciated!!

Thanks
peter

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 349
Default CommandButton objects move in worksheet

Hello again,

Based on Kevins input, and looking at another thread (which however related
to excel 2002, and I run 2003) I have tried the option "Move and size with
cells". Although this is not the behavior I really want, it apparently works
around the problem.
What I don´t understand that the problem seems to have survived the version
change to 2003. Has anyone possibly found a real fix for the issue?

regards

peter

"peter" wrote:

Hi Kevin,

Thanks for the answer, but unfortunately it doesn´t solve the issue...

peter

"Kevin B" wrote:

Open the Control Toolbox toolbar, click on the design button, right-click on
your command button and select "Format Control". Click on the properties tab
in the dialog box and click the "Don't move or size with cells" option button.

--
Kevin Backmann


"peter" wrote:

Hello,

Maybe someone has a hint for me whats wrong here :-)
I have written some VBA code that allows to expand/collapse a previously
grouped set of rows dependent of the state of a checkbox object. Works fine
sofar. Then I have placed a CommandButton within that group, used the
TopLeftCell Property to decide if the button is within the group range and if
yes, hide the CommandButton when collapsing the group with the .visible
property. Still works fine. The problem occurs if I save and close the
worksheet while the respective group is collapsed (showDetail property =
false). If I do this, after re-opening the workbook the CommandButton has
changed its position, obviously messing up the worksheet layout completely.
I have to confess I am a VBA newbie, maybe I have a fundamental conceptual
error here- or is this simply a strange excel behavior?
Any help or hint would be much appreciated!!

Thanks
peter

Reply
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
cant insert a row it says cant move objects off sheet? Wick Const. Excel Discussion (Misc queries) 2 July 1st 08 02:55 PM
Cannot move objects off sheet mapnimad New Users to Excel 1 July 10th 07 11:52 PM
Warning - "Fixed objects will move" kbwgirl Excel Worksheet Functions 1 September 8th 05 06:45 PM
Why can't I resize/move objects in XL XP chart? tjak Excel Discussion (Misc queries) 5 March 7th 05 02:13 PM
Fixed objects will move Heidi[_3_] Excel Programming 0 February 13th 04 06:53 PM


All times are GMT +1. The time now is 11:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"