I would like to use the attached "menu maker" file I found on Ron De Bruin's site using a Sheet to build the menu, yet be able to place it before the Help menu as suggested by this site [url] by finding the position of Help.
I have amended the code yet receive a "Compile error: Variable not defined" error.
I was making a custom Menu Bar in excel. In order to troubleshoot I executed the code a no. of times, resulting in multiple but same menu bars in excel application. Now the problem is that even if I quit excel, the menu bars dont seem to go..How do I get rid of them.
how to manage a custom faceid. Though, I am not too sure as to how to assign an actual icon to a custom toolbar. I can try the pasteface method; though as the source file is a .png; the picture might be too small.
Trying to write a VBA code to add a new menu item with submenus on the Standard toolbar when Workbook_Open and then deleting it (_Before close). Just having trouble with the creating of the menu item. Here is what I have so far:
Sub Workbook_Open() ... Dim menuitem As CommandBarPopup Set Menu = Application.CommandBars("Menu Item").Controls.Add (Type:=msoControlPopup, Before:=13) ... End Sub
I am taking an EXCEL(online) class and in my current assignment i am to create a 'list' for sorting and querying. However i cannot find the 'list' option, under my DATA option on the toolbar. I have tried all my toolbars and shortcuts but I am unable to find it anywhere.
I want to be able to create a range of VBA userforms to quickly perform long tedious tasks. I want these userforms to be accessed from a nice tidy toolbar.
I have done this and it looks nice and works well. What I would like to be able to do is have my custom toolbar of userform controlled functions be transferable so that if someone else wants my toolbar and attached functions they can install it easily much the same way you can do with an add in.
Is this sort of thing possible or does it require them to manually install all my userforms, modules and toolbar? If it is possible what sort of things should I be looking at?
I coppied this code from: http://www.contextures.com/xlToolbar02.html. Modified it to show menus but how to add sub menus? (This is the only code I found that works on Excel 2000, so far).
Need to code to create a custom floating menu which appears on opening the workbook. It works brilliantly, but I'd like to adapt it so that I can create a floating toolbar, which is fully expanded upon opening, where the button faces are plain text which I designate. Let's suppose the macros I want the buttons to trigger are called MacroA and MacroB, and that the text on the buttons should read "Do A" and "Do B".
Sub Create_Menu() Dim MyBar As CommandBar Dim MyPopup As CommandBarPopup Dim MyButton As CommandBarButton Delete_Menu 'make sure commandbar isn't already running Set MyBar = CommandBars.Add( Name:="My Menu", _ Position:=msoBarFloating, temporary:=True) With MyBar .Top = 175 .Left = 850 Set MyPopup = .Controls.Add(Type:=msoControlPopup) With MyPopup .Caption = "My Tools" 'change to suit....................
I have created 2 toolbar buttons which were attached to a macro that ran the original 'EditTenancy'. I now want to change these to use anew macro 'EditExistingTenancy' but cannot see how to do it as when I right click now I only get a toolbar list.
I'm preparing a model which has a few macros built-in. Let's call them Macro A, B, C etc. I want to trigger them via buttons on a custom toolbar (no problem) which a recipient of the model, on another PC, will be able to see (problem).
It was suggested to me that in Customize mode I can right click the custom toolbar and then click "Attach..." but this always causes Excel (2002) to freeze; I must then close Excel.
Someone else suggested that a better way is to have VBA code create the toolbar "on the fly" automatically when a recipient opens the spreadsheet. This is too advanced for me to write at the moment. Could someone give me a steer?
I created a custom toolbar called "PAT" for users. It has 5 custom buttons-save, import,submit,close,help. I attached it to the toolbars as instructed at the site http://www.ozgrid.com/VBA/toolbar-remove-restore.htm. I need to keep the worksheet tabs showing so I cannot use the application.DisplayFullScreen = True. For each worksheet that the user will be viewing, i have the following
Private Sub Worksheet_Activate() Application.CommandBars("PAT").Enabled = True Application.CommandBars("PAT").Controls("Import").Enabled = False Application.CommandBars("PAT").Controls("Submit").Enabled = False Application.CommandBars("PAT").Controls("Save").Enabled = True Application.CommandBars("PAT").Controls("Help").Enabled = True Application.CommandBars("PAT").Controls("Close").Enabled = True End Sub
ON my workbook activate code and workbook open code, I remove all native toolbars so only the one i created is showing, using Application.CommandBars("PAT").Enabled = True On workbook deactivate I have the following.................
I have written VBA to create and populate a custom toolbar when a worksheet is opened, and to close when it is closed. I need to know if its possible to disable the close button of the toolbar, as I don't want any of my work colleagues accidentally closing the toolbar and then coming to me to ask me how to reopen it.
The file who containd the toolbars informations is C:Documents and Settings<<USER>>Application DataMicrosoftExcelExcel.xlb
I copied this file to another computer and my custom toolbar appeared there.
In a file, I created a custom toolbar with submenus. It is possible to save this toolbar with file, so that I can use the file on other computers without the need to create each time this bar.
I have created a workbook and made a custom toolbar to perform the macro functions for the sheets in the workbook. Everything works great for me, but I want to attach the custom toolbar to the workbook so that whenever someone else pulls up the workbook they pull up the custom toolbar too.
I used the tools menu, clicked customize, toolbars, attach, selected the custom toolbar and clicked copy.
No toolbar appears.
I can select View, Toolbars, and select the custom toolbar, then the toolbar appears, but when I close the sheet the toolbar remains.
When someone else opens the sheet, the toolbar appears without any "buttons." It is an empty toolbar.
The help text isn't helping because the instructions for attaching a custom toolbar to a worksheet (tools/customize/toolbars/attach/copy) do not attach the toolbar to the workbook.
A couple years ago i made a giant spreadsheet and had 2 custom toolbars to run macros from to manipulate the sheet.
This year i re-did the sheet, meaning all my old data was replaced (it's a giant schedule basically).
However, the Macros in the custom toolbars stayed exactly the same and performed the same function and are directed to the exact same cells, rows, columns, etc..
But now when i hit the buttons on the custom toolbars to run my macros, i get the following message... all the time...
** A document with the name "NHLsheet.xls" is already open. You cannot open two documents with the same name, even if the documents are in different folders. To open the second document, either close the document that's currently open, or rename one of the documents. **
Trouble is, i have only 1 document open! There's something in the macros that thinks i'm trying to open a new document but i'm clueless as to where or why.. they are very simple macros that do not require the opening of any new workbooks..
All they do is point to another sheet within my open workbook, "NHLsheet", copy a particular row from that sheet, and paste it to a specific spot onto another sheet within my workbook, "NHLsheet".
I work with excel docs that have alot of sheets. I managed to create a vba form that has a listbox populated with the sheet names, that when clicked goes to the respective sheet. The problem is that when the form is open i cannot focus on the excel sheet - the form needs to be closed first.
1 ) Is it possible to make an excel vba form dockable (so it could be displayed on the right where help would be)
Or
2) Would it be possible to create a drop down in the toolbar that would have the sheet names.
I think the latter is a cleaner solution (if possible).
How can I save a new xlt or xls so that the toolbar settings I am viewing will always reload with excel. I have tried purging all items from my xlstart locations, but unwanted (and unchecked) toolbars keep reappearing when I restart excel.
I had made a Workbook with my own command Bars, and everthing is ok .. the problem is when i copy it to anthor pc. i have got an error msg. and when i check the code (debug) i've found the problem is with that command bars ( it's missing ) and now the Q is:
how to copy a workbook with it's all add-in's and customised bars ?
I have added a toolbar to an excel application that the company uses. I need this toolbar only to be accessed to this application and not any time that you open excel. I have used the following
Private Sub Workbook_Open() Application.CommandBars("Rithin-Toolbar2006").Enabled = True Application.CommandBars("Rithin-Toolbar2006").Visible = True go_cover End Sub
Private Sub Workbook_close() Application.CommandBars("Rithin-Toolbar2006").Delete Application.CommandBars("Rithin-Toolbar2006").Enabled = False Application.CommandBars("Rithin-Toolbar2006").Visible = False End Sub
This works but only If I accept yes when it prompts me to save changes to the workbook. Each time I open the workbook and close it, it prompts me to save changes to the workbook. I dont want to force a save on the workbook, meaning have code that will save the workbook before closing. I want it such that if the user opens the workbook, and makes no changes, he/she should just close it with no questions asked.
I have a custom toolbar containing several buttons which run several macros. Works fine except on exiting the programme and re-opening the workbook, if I try to use the custom buttons I get an error message which tells me it cannot find the ' name of workbook, name of macro' macro I then have to re-assign the macro which has been there all the time but without the file name in front of it.
How do you control the orientation of a floating toolbar? The code below puts the elements horizontally, while I'd like to make the toobar have a vertical format (one macro per line). I'd also be interested if there's a way to do sub-menus to organize the toolbar buttons better. how to revise the code below, and/or a pointer to where I can read about this. I tried searching google and this forum to no avail.
Option Explicit Public Const ToolBarName As String = "My Toolbar" Sub Auto_Open() Call CreateMenubar End Sub Sub Auto_Close() Call RemoveMenubar End Sub Sub RemoveMenubar() On Error Resume Next Application.CommandBars(ToolBarName).Delete On Error Goto 0 End Sub Sub CreateMenubar()......................
I am using the following code to create an Excel toolbar custom control Button. What would be the VBA code to change the color of the image I have chosen? ....