![]() |
Hide/Unhide Form Control
I have a forms checkbox control on a worksheet. Control is title "cbLOC".
Based on the selection of a dropdown box, I want this control to show or not show. Right now I have created a text box slightly larger than the control and superimposed over top of the checkbox. The plan is to send the checkbox control to the foreground when it needs to be available otherwise hide it in the background by sending it to the back. Code at the moment is Sheets("Inputs").Shapes("cbLOC").ShapeRange.ZOrder msoSendToBack I get a runtime error 438. Do I need to force it into "Design Mode" and how do I do that? Is there any way to simply hide the control rather than covering it up? |
Hide/Unhide Form Control
Me.cbLoc.Visible = Fals -- jt ----------------------------------------------------------------------- jtp's Profile: http://www.excelforum.com/member.php...fo&userid=2113 View this thread: http://www.excelforum.com/showthread.php?threadid=56874 |
Hide/Unhide Form Control
This will toggle it
With Sheets("Inputs").Shapes("cbLOC") .Visible = Not .Visible End With -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "qwerty" wrote in message ... I have a forms checkbox control on a worksheet. Control is title "cbLOC". Based on the selection of a dropdown box, I want this control to show or not show. Right now I have created a text box slightly larger than the control and superimposed over top of the checkbox. The plan is to send the checkbox control to the foreground when it needs to be available otherwise hide it in the background by sending it to the back. Code at the moment is Sheets("Inputs").Shapes("cbLOC").ShapeRange.ZOrder msoSendToBack I get a runtime error 438. Do I need to force it into "Design Mode" and how do I do that? Is there any way to simply hide the control rather than covering it up? |
All times are GMT +1. The time now is 11:22 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com