Creating A Custom Button When I Install My Self-made Add-in
Apr 16, 2006
Finally after 3 days of intensive studying VBA, my first add-in pack is ready to be installed in the office. I've got my custom form all ready, now all I need is to have excel create a custom button on the toolbar that calls up my custom form when clicked.
The idea of assigning a shortcut key doesn't really appeal to me. I'll be packaging it up in .xla format. Would be greatful if anyone can direct me on how to add a button to call up my form (only one form in fact).
View 2 Replies
ADVERTISEMENT
Feb 17, 2009
I have finally come up with a macro and would like to install it to around 10 people's "Personal Workbook" in my department. Let me explain a bit further...
We use web-based software which has an "Export to Excel" option which we all use. The resulting data populates into a spreadsheet automatically.
I would like the user to be able to click on Tools/Macro/Run Macro and then run that particular macro. I assume that this macro should be in the "Personal Workbook" so that the macro will be visible no matter what worksheet they may have open?
Can this be done automatically/with a macro or must this be manually done?
I"m using Excel 2003.
View 14 Replies
View Related
Aug 6, 2009
how to write a custom made IFERROR function which works on Excel 2003 that mimics as closely as possible the Excel 2007 IFERROR function without using any array formula.
View 2 Replies
View Related
Oct 12, 2013
I have a list of employees that can be assigned to tasks, the list is large enough that I cannot remember who is assigned to what.
All the employees assigned major tasks are automatically filtered out but these are employees with administrative tasks that should only be assigned as a last resort. I would like to assign the employees with administrative tasks a gray, italic, strike-out or some other font to indicate that they are different.
I assume this is done during the Add Item process...
View 2 Replies
View Related
Feb 12, 2014
I have a fairly straightforward UserForm with 4 listboxes and 4 option textboxes (the textboxes do not need to be a part of the validation I'm needing). I then have a command button that I want to be enabled ONLY if ANY of the 4 Listboxes have a selection. I've tried the "Change" event code below and it works upon the first selection of any listbox item.
However, if the user de-selects all selections in the listboxes (i.e. they are all unchecked), the command button remains enabled. I need the validation logic to enable/disable the button to persist as long as the user has the form open and if there is not a selection in ANY of the listboxes. The reason being is that if they click the command button it will update the cells in the worksheet, which if empty may overwrite previous work completed with blank cells.
View 3 Replies
View Related
Jun 28, 2014
I have the following macro in my spreadsheet to extract specific data from closed workbooks in a folder. It works great but what I would like to do is make it so I can just open the spreadsheet and press a button I create that will extract the data from the folder that it lies in.
Currently I have this specific spreadsheet just sitting by itself and I manually work out the address of where my spreadsheets lie and add that address into the code and run the macro. I find it a little cumbersome and me not knowing a hell of a lot in VBA don't know what the command is to make it pull the data from the folder that it resides in. Once I do this then I can create a button and assign the macro to it. Can change the code to be able to extract the data from all of the workbooks in the folder that the macro enabled spreadsheet lies?
[Code] ....
View 14 Replies
View Related
May 1, 2014
I have two lists mainly TV Brand & There Models.
List 1 (TV Brand)
Sony
LG
Samsung
Depended List 2 (Models)
Sony LG Samsung
EX420 55EB9600 PL43E450A1FXZP
EX430 77EC9800 PL43E490B4FXZP
EX550 55EA8800 PL43E400U1FXZP
EX520 KN55S9C UN32EH5300FXZP
EX645 55EA9800 PL64E8000GFXZP
I'm using two Listboxes (Form Control) with multiple selection options namely Listbox 1 (Brand) & Listbox 2 (Models). I want listbox 2 input range to be depended on selection made on Listbox 1 (Brand). For example, if user selects Sony then box2 should show only Sony's models and if user selects Sony & LG, box2 should show models for both Sony & LG.
View 3 Replies
View Related
Jan 11, 2010
I am trying to create a custom sorting in VB. My sorting needs to be first on column B, then C and last on G. My data does not have headers.
View 5 Replies
View Related
Feb 11, 2014
I'm looking at what appears to be a custom chart. It is a box divided into 4 equal quadrants. In each quadrant is a percentage with the total equaling 100%. In each of the quadrants there is fill equal to the percent that is numerically written in that quadrant. I'll post a picture with this, but if I was talking cells then....
A1 = 15% B1 = 66%
A2 = 4% B2 = 15%
The backround image behind the number is filled up by volume equal to the percentage indicated. They are also color coded with red representing the highest percentage quadrant filled.
To top that, there are little arrows along the sides of each quadrant indicating an average score.
My first question is WHAT TYPE OF CHART IS THIS THING!, and second can this be done in excel?
View 4 Replies
View Related
Apr 14, 2013
I want to create a custom format for a cell for entering in "cup measurements". I want to be able to type in 5, 1/4, 1/16, etc. and have the word "cups" appear after the number in that cell. I formatted the cell to say the word cups after typing in the numbers in my cell using the code "cups".
ex: 0 "cups" works fine for whole number
so then if i change it to 0/0 "cups" is works great for only 1/8 but not 1/16 or whole numbers. Then I looked at other custom codes that already existed in my formatts so I attempted to try this code which I just kinda came up with
_(0/00);_(0);_(0/0); "cups"
well it isn't doing what I want and If I use the 0/00 "cups code and I type in 4 cups the cell then says 4/01 cups.
What does my code need to be for me to show whole numbers and and size fraction without having it look weird?
View 2 Replies
View Related
Jun 6, 2007
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).
View 9 Replies
View Related
May 25, 2012
I am building a macro and am just not figuring out how to do this. I am trying to create a new workbook, then give it a name. Simple right? Well, I have the format for the file name to be "mm-dd-yy Transmittal #.xlsx" but I can't figure out how to make the # part of that equation start as 1 but if the file already exists change it to 2, if that exists, change it to 3, and so on. Here's what I have so far:
Code:
Sub Transmittal()
Dim NewBook As Workbook
Dim MyPath As String
[Code]....
I don't think I'm allowed to do "x + 1" so that is probably where my problem is coming from.
View 9 Replies
View Related
Jan 6, 2013
I want to create a custom tool bar for a work book but when I right click in the unused part of the tool bar area the only options I get are customize Quick access tool bar and customize the ribbon.
View 3 Replies
View Related
Sep 30, 2013
I need a way to make a customized legend for a scatter plot, is there any way to do that through VBA? I have a scatter plot with some points highlighted green, and some points grey depending on the user selection and need to be able to create a legend based on what the user selects (e.g. Green - Category B, Grey - Category A, etc.).
For some reason I can't get Excel to rename points on the scatter, so I feel like there is only one option: create custom images and align them correctly with labels on the plot.
View 2 Replies
View Related
May 29, 2007
I have a workbook that creates three temporary menu buttons when I open it. These work fine until I try and open more then 1 workbook at a time. This creates duplicate menu buttons (3 times the number of workbooks that I open).
I call up the procedure when each workbook is opened using this code in the "ThisWorkbook" code area: ....
View 9 Replies
View Related
Aug 8, 2012
I was wondering if it is possible to create a custom pivot table report filter? I would like to take an existing pivot table report filter and manually add values into it. I would like to do this because I have multiple pivot tables, some with the same values and some with different values and I have a VBA code from Contextures that applies a mass filter to all fields with the same name. So if i could manually add values into one report filter, I could filter from one location and have all my pivot tables update at the same time if they contain the value that i would like to filter by.
View 1 Replies
View Related
Aug 8, 2013
I have a pretty developed add-in I've created for use at work. It has 3 full custom ribbon tabs worth of buttons and boxes and other features that run all of the macros in the project. Everyone loves it. The only problem is, its only used when we work with customer statement excel files. When using Excel for other tasks it is annoying to have 3 extra, essentially useless tabs taking up space on the ribbon.
Is it possible to create a button and stick it on, say the Data tab, that will "Start" the add-in and make the 3 custom tabs visible? Ideally there would also be a button to "Close" the add-in or hide the extra tabs until they're needed as well, but how to customize for my specific needs.
View 1 Replies
View Related
Mar 21, 2007
I am trying to create a custom button in Excel that will sort on two different columns. One column has $ Sales and the other has Unit Sales. So you can click on the button and it will sort by $ Sales and if you click the same button again it would sort by the unit sales. I'd also like the text on the button to reflect what option the data would be currently sorted by. I am able to do one of these macros and assign it to the button, but can't figure out how to get both sort options assigned to the same button. I have had outside people send spreadsheets to me with this but can't figure out how they did it.
View 2 Replies
View Related
Aug 14, 2007
Is there a way to insert a toggle button into a custom tool bar?
View 4 Replies
View Related
May 13, 2006
I have a spreadsheet with a large number of sheets in it and was trying to create a easy and intuitive way to navigate. My solution was to create a tool bar and populate it with buttons. Two Issues:
1) The attached code (ButtonName) works well except if the “Begin a Group” flag is set on a button, the index seems to be one off per flag.
2) How do you set the “Begin a Group” flag from VBA?
Sub CreateNavBar()
Set newBar = CommandBars.Add( Name:="CostBook Navigation")
newBar.Visible = True
For Each mySht In Worksheets
Set con = newBar.Controls.Add(Type:=msoControlButton, ID:=2950)
con.Caption = mySht.Name
con.Style = msoButtonCaption
con.OnAction = "ButtonName"
Next
End Sub
Sub ButtonName()
SheetToActivate = CommandBars("CostBook Navigation").Controls(Application.Caller(1)).Caption
Worksheets(SheetToActivate).Activate
End Sub
View 2 Replies
View Related
Aug 10, 2006
I need to select a print area that includes all rows to the last row with data in column A. What is the proper code for this? I tried the following (shot in the dark), and of course it doesn't work.
Sub Print_()
ActiveSheet.PageSetup.PrintArea = "A( Cell((65536).End(xlUp)):X1"
ActiveSheet.PrintOut
End Sub
View 9 Replies
View Related
Apr 3, 2007
how to change the name of a Command Button that I have called "Command Button" on the Tools menu.
Also if I have this button created in my Personal workbook and I send the file to another user what should I do? Will that user be able to see this button ok?
View 4 Replies
View Related
Jun 23, 2005
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? ....
View 6 Replies
View Related
Sep 20, 2006
I created a custom toolbar button which works perfectly.
Because I needed to save each workbook as a specific workbook this is taken care of by the vb code.
I would like when the button is pressed for the original workbook template to be opened.
At this moment if I have a blank workbook or no workbook open and I press the button the programme opens a version of the workbook but not the template version how do I point Excel at the templates.
View 3 Replies
View Related
Jun 20, 2013
I already have a Macro button built that hides values in column A. The next step I am trying to perform is a custom sort on column B in this order "Backordered", "Sourced", Shipped", and "Received". Here is my code that I have so far but where to begin adding in code to make this button sort.
Sub Inbound()
ActiveSheet.Cells.EntireColumn.Hidden = False
ActiveSheet.Cells.EntireRow.Hidden = False
Application.ScreenUpdating = False
[Code] ........
Excel 2007/Windows 7
View 1 Replies
View Related
Aug 12, 2006
Image size appears in button(msocontrolbutton) of custom toolbar Excel 2000 is very small and blurred using below code. How I can increase size of image in button (msocontrolbutton) as well as brightness of image in custom toolbar? I am able to increase size of button using width and height property but image appears in center of button as 16X16. How to fit image to button(msocontrolbutton)?
Const cImgCommandBarID As String = "TMC Img Toolbar"
'Image code
Dim cbImgBar As CommandBar
Set cbImgBar = CommandBars.Add( Name:=cImgCommandBarID, Position:=msoBarTop)
'cbImgBar.context = 1000
Dim cbImage As CommandBarControl
Dim imgTool As Shape
Dim sFileName, ImgSheet
sFileName = ActiveWorkbook.Path & "ImagesABC.jpg".....................
View 2 Replies
View Related
Aug 13, 2014
How to create a button on the Ribbon (after you have created a group), and connect this button with a VBA code. So you can avoid going to developer->Macros->find the code and click run.
View 3 Replies
View Related
Nov 5, 2008
Is it possible to create a find button, so that a user can enter say the first two letters of a name and the vba finds and replaces the rest from a table and also add the telephone number in the box below it?
If there is more than one option to bring up a choice box asking the user to select between them.
I have attached a spreadsheet to show what I mean.
View 14 Replies
View Related
May 17, 2007
I have been given a workbook that contains say 10 sheets. The first sheet is a summary sheet that will contain a 'Print' button. The idea is that when the Print button is selected all the sheets that's have been filled out will be printed.
For example.
I have a workbook that has 10 sheets to fill out. The user has filled out 7 out of the 10 sheets and when selecting the Print button, I require only the 7 completed sheets to print.
I thought the best way to go about this was to look at 1 particular cell on each sheet. If the cell is blank, do not print the sheet, otherwise do so.
View 9 Replies
View Related
Jul 25, 2008
I want to be able to have a listbox on a sheet (whether this is already on the sheet or created by a macro I don't care), and have a button next to it. Once the list box has been filled in (with multiple selections) I want the user to press the button, the list box and button disappears and the items selected in the list box are placed into consecutive cells underneath each other.
First problem: To start with I have tried to create the listbox and button using VB
Sub lbtest()
Dim lb As Object, ButCon As Object
Set lb = Sheets("Sheet1").Shapes.AddFormControl(xlListBox, 100, 100, 150, 100)
lb.ControlFormat.MultiSelect = xlSimple
lb.ControlFormat.ListFillRange = "M1:M8"
Set ButCon = Sheets("Sheet1").Shapes.AddFormControl(xlButtonControl, 255, 100, 100, 25)
With ButCon
.OnAction = "Inactive"
.PrintObject = False
End With
View 9 Replies
View Related