ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Floating Toolbar (https://www.excelbanter.com/excel-discussion-misc-queries/24158-floating-toolbar.html)

Dave

Floating Toolbar
 
Hi All

Is there a way to have a floating toolbar in say Sheet1 and one in Sheet2
with different names and they only show up in there own sheet.

Thanks in Advance

Dave



Bob Phillips

Hide it and make it visible in the worksheet_Activate event

Application.Commandbars("myBar1").Visible = True


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Dave" wrote in message
...
Hi All

Is there a way to have a floating toolbar in say Sheet1 and one in Sheet2
with different names and they only show up in there own sheet.

Thanks in Advance

Dave





Dave

Thanks for a quick reply, Bob

I'm new to Excel, I've been looking were to put this code I've looked in the
sheet, view code etc. Also looked in Help. I'm lost
Could you tell me how and where to put this code.

Application.Commandbars("myBar1").Visible = True

-------------------------------

Hi All

Is there a way to have a floating toolbar in say Sheet1 and one in Sheet2
with different names and they only show up in there own sheet.

Thanks in Advance

Dave

-------------------------------

Hide it and make it visible in the worksheet_Activate event

Application.Commandbars("myBar1").Visible = True


--

HTH

RP
(remove nothere from the email address if mailing direct)



Dave

Thanks for a quick reply, Bob

I'm new to Excel, I've been looking were to put this code I've looked in the
sheet, view code etc. Also looked in Help. I'm lost
Could you tell me how and where to put this code.

Application.Commandbars("myBar1").Visible = True

-------------------------------

Hi All

Is there a way to have a floating toolbar in say Sheet1 and one in Sheet2
with different names and they only show up in there own sheet.

Thanks in Advance

Dave

-------------------------------

Hide it and make it visible in the worksheet_Activate event

Application.Commandbars("myBar1").Visible = True


--

HTH

RP
(remove nothere from the email address if mailing direct)




Bob Phillips

Dave,

Hope this helps

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
If Sh.Name = "Sheet1" Then
Application.CommandBars("myBar1").Visible = True
Application.CommandBars("myBar2").Visible = False
ElseIf Sh.Name = "Sheet2" Then
Application.CommandBars("myBar1").Visible = False
Application.CommandBars("myBar2").Visible = True
End If
End Sub


'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code

Change the sheet names and commandbar names accordingly.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Dave" wrote in message
...
Thanks for a quick reply, Bob

I'm new to Excel, I've been looking were to put this code I've looked in

the
sheet, view code etc. Also looked in Help. I'm lost
Could you tell me how and where to put this code.

Application.Commandbars("myBar1").Visible = True

-------------------------------

Hi All

Is there a way to have a floating toolbar in say Sheet1 and one in Sheet2
with different names and they only show up in there own sheet.

Thanks in Advance

Dave

-------------------------------

Hide it and make it visible in the worksheet_Activate event

Application.Commandbars("myBar1").Visible = True


--

HTH

RP
(remove nothere from the email address if mailing direct)






All times are GMT +1. The time now is 01:49 PM.

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