ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Keeping buttons stationary when unhiding rows. (https://www.excelbanter.com/excel-programming/366143-keeping-buttons-stationary-when-unhiding-rows.html)

wilro85[_16_]

Keeping buttons stationary when unhiding rows.
 

Alright y'all. I have a [very cumbersome] solution to a particular
problem, but I'd like to know if there is a better one.

The setup: Basically, I have buttons that hide and show different
options further down the sheet which leads to other buttons and such.

The problem: When unhiding rows (and the buttons that corresponds) the
*button*.top = number changes depending on how many rows are shown.

On another sheet I just brute forced it and worked out every option and
put an if-then for every option. If at all possible, I'd like to avoid
doing that again.

Does anyone have any ideas in which direction I could take this?


--
wilro85
------------------------------------------------------------------------
wilro85's Profile: http://www.excelforum.com/member.php...o&userid=26935
View this thread: http://www.excelforum.com/showthread...hreadid=557948


Vic Eldridge[_3_]

Keeping buttons stationary when unhiding rows.
 
Hi Wilro,

Have a play with the .Placement property of your buttons. One of those
options should do what you need.


Regards,
Vic Eldridge



"wilro85" wrote:


Alright y'all. I have a [very cumbersome] solution to a particular
problem, but I'd like to know if there is a better one.

The setup: Basically, I have buttons that hide and show different
options further down the sheet which leads to other buttons and such.

The problem: When unhiding rows (and the buttons that corresponds) the
*button*.top = number changes depending on how many rows are shown.

On another sheet I just brute forced it and worked out every option and
put an if-then for every option. If at all possible, I'd like to avoid
doing that again.

Does anyone have any ideas in which direction I could take this?


--
wilro85
------------------------------------------------------------------------
wilro85's Profile: http://www.excelforum.com/member.php...o&userid=26935
View this thread: http://www.excelforum.com/showthread...hreadid=557948



wilro85[_17_]

Keeping buttons stationary when unhiding rows.
 

How would you suggest using it?

1- Move and Resize with cells: My first instinct, because I want it t
be in a certain area at all times, but when I have it on this settin
the same problme remains.

2- Move with cells: This is how it was originally set when I asked.

3- Don't move or Resize: This caused an error when I toggled m
button. The error appeared on the line of code hiding the button an
said, "Unable to set the visible property of the OLEObject class.

--
wilro8
-----------------------------------------------------------------------
wilro85's Profile: http://www.excelforum.com/member.php...fo&userid=2693
View this thread: http://www.excelforum.com/showthread.php?threadid=55794



All times are GMT +1. The time now is 12:55 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com