Macro To Hide All Toolbars
May 22, 2009I am looking for a macro to hide all toolbars i am using this at the moment
View 4 RepliesI am looking for a macro to hide all toolbars i am using this at the moment
View 4 RepliesI ONLY want to show the status bar, worksheet tabs, horizontal and vertical scroll bars.
I've tried using the code below but the column and row headings will not show on the first sheet i bring up, but it reappears on other sheets. everything else works fine ....
I have a procedure that stores the Commandbar names and visibility settings in an array on open. Another procedure hides all Commandbars on open and restores their original visibility settings on close. For some reason the "Standard" and " Formatting" toolbars don't return to visible on close.
My error log says "08/13/07 18:21:37 [QA.xls]MCommandBars.bRemoveMenus(), Error -2147467259: Method 'Visible' of object 'CommandBar' failed". I have tried manually testing the hide/unhide procedure with hard coded settings and checked the correct variables are being sent and all seems to be correct.
I am pretty confident that the procedure to store settings is correct but have included the code just in case, also just noticed the "Standard" and "Formatting" toolbars are the only two visible at programme start.
Public gsaMenus() As String
Public Function bMenuSettings() As Boolean
Const sSOURCE As String = "bMenuSettings()"
Dim bReturn As Boolean
Dim iCounter As Integer
Dim cbrMenu As office.CommandBar
I have a macro that starts when the workbook is open that hides many of the headers and toolbars. It is great and works fine unless you are working on another workbook and need to see those headers and tool bars. Is there a way to display and hide those items per workbook and not for the entire application. here is my failed attempt:
Sub show_excel_headers()
Dim wb As Workbook
Set wb = ThisWorkbook
wb.Application. ScreenUpdating = False
'Display Headings in all worksheets
Dim wsSheet As Worksheet
Dim sSheetStart
Set sSheetStart = ActiveSheet
wb.Application.EnableEvents = False
For Each wsSheet In Worksheets
wsSheet.Activate
ActiveWindow.DisplayHeadings = True
I would like to hide the standard and formatting toolbars in excel when i enable workbook protection, however I have no idea how to get excel to realise when workbook protection has been enabled, and how to hide the toolbars in VBA also. Also i would like to know how to do the reverse (how to show tooldbars when workbook protection has been disabled)
View 3 Replies View RelatedI created a custom toolbar in excel. by right clicking on the toolbar, creating new, adding a couple buttons and assigning them to a couple macros.
I'd like to send this to people, how do i do this.
Obviously, the toobars's would have to reference the macros, these i have in an add-in.
Is there anyway that i could attach the toolbar's to the add-in so i could just send the add-in.
I also created a menu, is there anyway that i can put this into the Add-in also?
Where does the toolbar i created and the menu that i created save down. If i open a new excel without opening personal.xls, the toolbars will still be there (open one excel, then open another and it tells me that my personal.xls is in use by jason harris, i hit cancel so it opens without my personal workbook)
Lastly, if I open excel, then go into VB, I can save my personal workbook. How do I save this as or save a copy?
I lost my command bar and tool bars (excel 97) all I have is the blue bar on top then the column letters. How do I restore them?
View 9 Replies View Relatedmy excel is no longer showing any tool bars and I can not get them back, is there any short cuts to bring back the menus? I can’t even do a right mouse click on the sells for some reason. The only tool bar that is showing is the formula bar.
View 10 Replies View RelatedI have a slight problem with some code I am using. I have a user form where I force the users to enable Macros using the hidden sheets trick. Once the user enables the macros all of the toolbars dissapear from excel. The code I use to do this is below:
View 14 Replies View RelatedI find that the picture toolbar opening automatically when I click on a picture useful (sometimes).
Is there anyway of automating other toolbars to open (such as 'chart') when I click on an object?
I've been looking at various add-ins in google - but can't find one to do that.
Everytime this meant that I had to start from scratch in order to have my customized toolbars. This is a bit inconvenient.
Can I simply save some file (containing my XL toolbar settings) from some location and if I ever run into such a situation again, I can simply copy the saved file back into the same folder...
Thanks in advance for your help and BTW would the solution work the same way for different Excel versions or?? My O/S is XP and I use both Excel 2003 (once in a while I also use Excel 97 but that is installed on my other old pc).
A IT Ordering system has been created using Excel, I am prompted to enable Macros, no problem there. The problem is that when I exit the worksheet using a formulas setup as an exit button, my Excel is displayed with my Toolbars missing. I have been unable right-click at the top and re-add these I am only presented with the option to minimise, close etc. 1. How can I replace my Toolbars? 2. Is there a formula fix so that I can use this worksheet without losing my toolbars?
View 3 Replies View RelatedI use excel 2003 and have maybe 60-70 macros linked to buttons on maybe 6 custom toolbars. The macros are saved on a personal.xls that is saved in the XLStart folder so it will auto start every time I run excel. My excel crashed and my toolbars are all empty nubs and my personal.xls is still in the same folder but does not auto start...did a detect and repair no help...I manually started personal.xls no help...I found a thread that suggested looking for *.xlb didn't find it...a shared file with the same toolbars can be seen by other computers but not mine...
View 6 Replies View RelatedI want a code that removes all toolbars from excel when the .xls file is opened, then restores all toolbars back to their original setting when the .xls file is closed.
View 9 Replies View Relatedis there any way that i can remove the excel title bar and scrolling tabs so that the excel sheet do not resemble an excel document?
View 2 Replies View RelatedThis code snippet works when executed from a worksheet (it puts Menu Bar back) but returns an error when used in the This Workbook module.
Application.CommandBars("Worksheet Menu Bar").Enabled = True
CommandBars("ToolBar List").Enabled = True
CommandBars("Ply").Enabled = True
I have a custom toolbar created in a workbook. I have coded my workbook so that the full screen is displayed, removing the title bars, status bars etc
Application.DisplayFullScreen = True
However, there is still another menu option I am not able to remove. It is the "Add or Remove Buttons" and when you click that the "Customize..." button also is enabled.
I looked up some code on microsoft and only found code in office97 that gave me errors in 2003:
Sub DisableCustomize()
Application.CommandBars("Tools").Controls("&Customize...").Delete
CommandBars("Toolbar List").Enabled = False
End Sub
The quote from the site says "To prevent others from changing the menus and toolbars in a custom application, remove or turn off the Customize option on the Tools menu and turn off the Toolbar List shortcut menu."
I get an error saying invalid procedure when I run that.
how to disable the button or prevent users from choosing it?
I find (what look like) two extra toolbars have appeared at the top (below the standard and formatting toolbars) and to the left of my worksheet.
They have lines, dots and little boxes with an x or - in them, depending if you click on them or not. The +/- box function seems to be to make columns appear and disappear.
How did I turn this function on and more importantly, how do I turn it off?
I created 3 custom toolbars. I want toolbar A to be visible only in Workbook A.xls, toolbar B to be visible only in Workbook B.xls and toolbar C to be visible only in Workbook C.xls. while Workbooks A,B, and C are open at the same time. I use Workbook A to automatically open Workbooks B and C.
Problem: Since I'm openning the Workbooks automatically it only keeps the Toolbar C visible on all Woksheets.
I included the following code in the This Workbook Object on each Workbook:
For Workbook A:
Private Sub Workbook_Open()
Application.CommandBars("A").Visible = True
Application.CommandBars("B").Visible = False
Application.CommandBars("C").Visible = False
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CommandBars("A").Visible = False
Application.CommandBars("B").Visible = False
Application.CommandBars("C").Visible = False..............................
Is it possible to use a function that removes all toolbars upon opening the workbook and reinstates the same upon closing, the work book i am currently using does the following as described in the code. however the function is limited in that only toolbars stated in the code will be removed, if for instance there was an adobe toolbar, that remains on the screen. or is there a better way of going about this? On open:
Private Sub Workbook_Open()
Run ("CreatePReturn")
Run ("CreateProceed")
With Application
.CommandBars(" Formatting").Visible = False
.CommandBars("Standard").Visible = False
.CommandBars("Drawing").Visible = False
.CommandBars("Return").Visible = False
.CommandBars("Proceed").Visible = False
.CommandBars("Worksheet Menu Bar").Enabled = False
.CommandBars(" Chart Menu Bar").Enabled = False
.DisplayFormulaBar = False
.DisplayStatusBar = False
End With
With ActiveWindow
.DisplayHeadings = False
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
.DisplayWorkbookTabs = False
End With.................................
In Windows 98 for example when you created a Customised Toolbar and attached macros to it a file was created with the user name followed by 8.
i.e. timbo8
You could copy this file and keep it was a backup in case you lost the toolbar/s. Which invariably happened whn someone else logged onto your pc. When the company transferred over to Windows 2000 this file was called something else I thing it ended in a .xla extension but I don't know what it was called or where it it located.
I have created a spreadsheet and wanted to originally see if I could save as a separate format (that makes it more like an application than an Excel spreadsheet). Having investigated, I found that full screen mode pretty much does what I want, however you can restore the menus by pressing ESC or selecting restore down. Is there a way of preventing users from exiting full screen mode, I could add a close application button for them to use instead.
View 3 Replies View RelatedI was working on an Excel 2003 workbook with 3 worksheets. The first sheet is the 'Menu' sheet on which I placed buttons to take me to the other two sheets and back. I wanted to hide the Excel menus, toolbars, scrollbars, etc. on the 'Menu' sheet so that no user can alter that 'Menu' sheet. The 'hiding' code was not meant to affect the other two sheets.
The code worked fine. However, when I closed the workbook and tried to open a NEW workbook so that I could do some other work, I realised that the new workbook and its accompanying sheets had the menus, toolbars, scroll bars, etc. hidden. I closed the workbook and tried opening a new workbook. It was the same experience.
I called up the file with the code, deleted all the codes attached to that file, and re-saved the file. It did not solve the problem. And when I tried many more new workbooks and got the same problem, I deleted my entire Office 2003 installation and re-installed Office 2003. It still did not solve the problem.
I am trying to make a save&close workbook macro.
I found several examples on google, but unfortunatly it conflicts with another macro I use for forceing users to enable macros (hide all sheets except one if macros are disabled).
The attached file is an example contaning the save&close code and the show/hide sheets depending on macros enabled.
If the file is opened with macros disabled then only one sheet will be visible.
If the file is opened with macros enabled other sheets are visible.
The problem if that this code uses a custom save, witch makes the save&close not save... (in module1 and in ThisWorkbook)
The pourpose of the save&close is to make sure some users don't forget the excel open and thus block access to it. So if a certain idele time passes excel has to save and close without any confirmation messages.
I have 2 macros one hides a selection of rows and the other unhides them. What i want to be able to do is when an IF function is true then macro 1 (hide) is used. If the function is false then macro 2 (unhide) works. There is a code in VBA
View 3 Replies View Relatedi am looking for correct code to hide a row based on the cell value. for example, if G8 = 0, hide row 8
I'm not a VB programmer and have tried to write this macro but I can't seem to understand why it's not working.
View 11 Replies View RelatedI have created this macro (below) in a standalone spreadsheet and the expected results are that Columns A,B,C,D,G,H will be displayed after I run the macro.
But when I use the same macro in my production worksheet (columns and ranges adjusted accordingly) this macro creates the following results: Column A is displayed and all the rest are hidden (B,C,D,E,F,G,H). I am stumped as to why this occurs. Can you advice me as to how to get this macro to work and display A,B,C,D,G,H ?
I have the code below, which works fine apart from I get a little square coming up every time I run the code, as this gives you a line the Chr(10) has to be there. When I tale the Chr(10) out the little square disappears but then I don't get a new line. I have set the formatting to "wrap text" but it is still showing up. I am not quite sure where to go from here, I have also done a ="test"&CHAR(10)&"test" and that worked fine with no little square.
View 11 Replies View RelatedI have the following piece of code to hide all worksheets in my workbook but modify it to hide the multiple charts I still have open after running this:
Code:
Sub HideAllSheets()
Application.ScreenUpdating = False
Dim ws As Worksheet
[Code].....