Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2006

Tip: Looking for answers? Try searching our database.

CommandButton objects move in worksheet

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
peter - 17 Jan 2006 12:47 GMT
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
Kevin B - 17 Jan 2006 13:21 GMT
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.

Signature

Kevin Backmann

> Hello,
>
[quoted text clipped - 14 lines]
> Thanks
> peter
peter - 17 Jan 2006 13:50 GMT
Hi Kevin,

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

peter

> 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
[quoted text clipped - 18 lines]
> > Thanks
> > peter
peter - 24 Jan 2006 15:09 GMT
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

> Hi Kevin,
>
[quoted text clipped - 24 lines]
> > > Thanks
> > > peter
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.