silly object question, Probably right in my face

cizzett

Board Regular
Joined
Jan 10, 2019
Messages
121
So I have a "Tool Bar" across the top of my worksheet that I want to remain the exact same size and position except when row 1 is hidden the tool bar should be hidden as well.

If I hide columns etc I don't want the tool bar to change size but I can only seem to get it to either not size or hide or hide and size.

Any guidance would be appreciated as always.
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
.
Not much to go on. If the "toolbar" is a UserForm you can hide the form.
 
Upvote 0
They are multiple buttons, checkboxes, and a couple textboxes. All grouped together
 
Last edited:
Upvote 0
Where are these objects located ? In row one of the sheet ? Or somewhere else ?

It would be best if you could post your workbook (less and confidential information) to a cloud site so it can be downloaded and viewed.
DropBox.com, etc.
 
Last edited:
Upvote 0
Yep row one, I can post a screen shot in the morning when I fire up the laptop and a copy of the workbook once I pull a few items out of it
 
Last edited:
Upvote 0
.
This is one method.

Place two ActiveX command buttons on the sheet, in row one. Each button is attached to one of these macros :

Code:
Option Explicit


Sub Shapes1() 'command button one calls this macro
    On Error Resume Next
    ActiveSheet.DrawingObjects.Visible = False
    ActiveSheet.Rows(1).Hidden = True
    On Error GoTo 0
    ActiveSheet.OLEObjects("CommandButton1").Visible = True
    ActiveSheet.OLEObjects("CommandButton2").Visible = True
End Sub


Sub Shapes2() 'command button two calls this macro
    On Error Resume Next
    ActiveSheet.DrawingObjects.Visible = True
    ActiveSheet.Rows(1).Hidden = False
    On Error GoTo 0
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,754
Messages
6,174,317
Members
452,555
Latest member
colc007

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top