To Create Custom Msgbox Choices
May 7, 2009
I am trying to create a msgprompt but instead of using the default yes or no, I need 3 options, so if the user clicks the first option, it will check a certain box. It will look like this.
"What envelopes do we use?
Choice 1. Branded Choice 2. Unbranded Choice 3. Client Branded
View 9 Replies
ADVERTISEMENT
Jun 12, 2008
Can I create a messagebox which has unique buttons, "A", "B", "C"...and based on the users click, it performs an action? If so, how would I create this?
View 2 Replies
View Related
May 29, 2013
I'm trying to create a dynamic msgbox that will display what data has been updated based on checkbox selections in the userform. I've named my checkboxes as Carey, Keith, and Juliet.
Ideally if only Carey's data has been updated, I'd like the msgbox to say
' Data has been Updated for:
- Carey '
If Carey and Keith's data has been updated, I'd like the msgbox to say
'Data has been Updated for:
- Carey
- Keith '
etc.
MsgBox ("Data has been Updated for:" & vbnewline & _
If CAREY.Value =true then "- Carey" End if & vbnewline & _
If KEITH.Value =true then "- KEITH" End if & vbnewline & _
If JULIET.Value =true then "- Juliet" End if & ")
View 3 Replies
View Related
Apr 19, 2007
I was reviewing the "Create Custom Menu Items in Excel VBA" code located at [url] and cannot figure out something. How do I add a menu dropdown that contains MORE than one submenu item? This is the code my question pertains to: ...
View 9 Replies
View Related
Jun 23, 2014
I need a code to sort worksheets in a huge workbook. Is this technically possible!?
The information containing the worksheet order is available in worksheet "Aux", column A contains the rank (1,2,3,...etc.), whereas column B contains the corresponding worksheet names.
View 2 Replies
View Related
Aug 25, 2013
I am trying to create a custom sort list by going to preferences/custom lists and typing 37 items into a new list in Excel. It will not take all of the items after I type them in. Is there a limit as to how many items can be in the list. It seems to only take 18-20 items out of the 37 and erases the rest.
View 9 Replies
View Related
May 13, 2009
I am trying to create custom sort list. It works below when I define range as A1:A79.
Sub SortWS2()
Dim SortOrder As Variant
Dim sheetsorder As Range
Dim Ndx As Long
Application. ScreenUpdating = False
With Worksheets("Sort Order").Range("A1:A79")
For Ndx = .Cells.Count To 1 Step -1
Worksheets(.Cells(Ndx).Value).Move before:=Worksheets(1)
Next Ndx
End With
Application.ScreenUpdating = True
End Sub
I have created a dynamic range called sheetsorder. If I revise my code it does not work.
Sub SortWS2()................
View 6 Replies
View Related
Feb 15, 2010
I have created an Addin from one I found on this site which creates a menu on the CommandBar. On this menu I can add my Macros. The Menu is initially supposed to perform a delete function then an add, just in case the menu already exists on the CommandBar. It is also supposed to Uninstall the menu when you de-select the Addin. At the moment it doesn't seem to be doing either, as I have now got 5 CommandBar menu's all the same and I can't delete them?
This also creates a problem of when I add another macro, the menu on the CommandBar doesn't update with the addition?
I have attached the .xla file for you to look at and see where I'm going wrong.
VBA Macros & Creating An Add-in For Them
View 5 Replies
View Related
Jun 28, 2013
I have a worksheet that uses the INDIRECT function as part of cell validation to generate a custom 'name' range, this name then references a bunch of sheets that contain the actual range where the values for the validation list are stored. For example: ValidationExample.xlsx
Name = Color
Values = Blue, Red, Green
Name = Shape
Values = Square, Circle, Triangle
So what this allows me to do is in the first cell, I can define two options such as Color and Shape. Once one of these is selected, the next cell will have a formula for the validation as "=INDIRECT(A1)" then I will define two named ranges called 'Color' and 'Shape'. This will then show me the list of items in the cell based on previous selection. An example of this is attached to this posting above.
When the formula is written into the validation, an error message is generated saying that the formula will generate an error. Even with this message, the method works effectively to provide a blank list if nothing in the first cell is selected, or a list dependent on the selection of the first cell.
In this case, what I want to do is generate a macro that will populate the validation for a cell when new records are added. This won't always copy down from previous cells because the way I add records is through use of a macro and I generally find using the format painter in vba to be a fairly sloppy way of getting formats from other cells. So I go through a series of validation additions to each cell in the worksheet to get this validation created (I have no written this into the workbook attached).
VB:
Dim i As Long
Dim lastRow As Long
Dim sht As worksheet
[Code] .....
As I read in previous posts, Formula1 cannot contain an actual formula, only names and lists of items. Since each of the cells will have a changing reference, thus the INDIRECT function would need to change to reflect this, The 'Secondary' name consists of the following:
"=INDIRECT(OFFSET(INDIRECT(ADDRESS(ROW(), COLUMN()), 0,-1)))"
Which of course does not work due to the error when using INDIRECT in the first place (though the Address() function appropriately finds the cell with the validation in it's appropriate address). I can think of other ways to do this, such as having validation lists change in with VBA on a SelectionChange or Change event, but that's a lot of code that is subject to change when the named ranges have changes to them (which is fairly frequent). Is there any way to get the .Validation.Add method to ignore errors in the name supplied to it.
For reference, my code is this:
VB:
Private Sub cmdRefreshValidation_Click()
'Re-enters validation parameters to all cells to allow selections
Dim i As Long
Dim lastRow As Long
Dim sht As Worksheet
[Code] .....
View 1 Replies
View Related
Jan 30, 2008
I am having trouble creating a custom data entry form in excel. What steps would I need to take..
Attached is a example of the data, the Headers are in bold, the highlighted columns are to be drop boxes.
View 11 Replies
View Related
Feb 19, 2010
how I can create a custom mask that will always put a / at the start of each cell in column C. So basically when I enter a number in, say 350, the mask will automatically put a / in front of it - /350 or even better /space350. The only issue is that the number will change in length a little, so not sure if this is a problem or not.
View 4 Replies
View Related
Jan 15, 2013
How would I create a shortcut to automatically copy the contents of cell H1 to cell K1, in other word I would like to hit a shortcut key and have the contents of that cell pasted 3 cells to the right on the same line. I have to do this over and over again down the worksheet. I am working on taxes and want to copy values over to the expenses column as I find them.
I would also like to know if it is possible while having cell D1 highlighted I could have a shortcut created that would copy the value three cells over in H1 to cell K1. That would be the fastest, but I don't know if it is possible?
View 2 Replies
View Related
Apr 1, 2009
I have an Excel sheet with a long list of data. A short example is shown below:
Section | Title | Item
1 | INTRODUCTION | a
1.1 | title2 | b
1.2 | title3 | c
1.2.1 | title4 | d
1.2.2 | title5 | e
I made a VBA macro in Excel that runs through this list and creates a new Word file for each item. The filename of the document is based on the data in the Excel file (section and title). Now I would like to add a custom property to each of the newly created Word files, i.e. the value in the 'item' column. Does anyone of you know how I should do this? Or should it be better if I write a macro in Word that runs through the Excel data to create the word files? Here is the code I use to generate the word files:
View 2 Replies
View Related
Jun 12, 2009
I'm looking to create a new file from data in my table. I don't want to even imagine having to do this manually again...I'm optimistic there is a solution. All the data needed to create the file is in the table, but i need it stacked and organized in a weird way. It's almost to hard to explain...so I color coded an attachement that basically says it all. It's pretty much the same thing repeated over and over except the last 2 lines. It's just a really messed up organization. In the real version I need the new file in a new workbook. I'm extremely grateful to anyone who can automate this thing
View 2 Replies
View Related
Sep 22, 2013
I am creating a custom autonumber in excel. The autonumber will be based on the value of another cell's value. So for eg, in cell A1 will look at B1, if B1 has the number 1, A1 will take B1 and add the autonumber to it, eg a, b, c.
If within, b5 the number is 2. So if the number in the corresponding row in b changes, the autonumber must restart.
I've decided to go with a-z for the autonumber as i realized for .1, .2, .3 is limited to 9 values in the list bec. 1.10 may be read as 1.1
I've tried a few options such as creating a named range, however the problem is getting the autonumber to restart.
Below is what i want to achieve via excel formula:
Column F
Column F
1.a
1
[Code] .........
View 5 Replies
View Related
Nov 12, 2013
I want to add some Data Validation for a cell and want it to validate that the entered data is in the format (DD/MM/YYYY HH:MM)
I guess I need to use a custom validation formula, however cant figure it out
View 1 Replies
View Related
Mar 26, 2014
I've created a custom Function. I would like for there to be a Helper when a user is entering the Function arguments.
For example if I go into a cell and type in =VLOOKUP(
A popup with appear that shows...VLOOKUP(Lookup_Value,Table_Array,col_index_num,[range_lookup]).
Is it possible for me to build something like this in my Function?
View 4 Replies
View Related
Jan 19, 2007
I am needing to create a sequential serial number using a format yyyy-nnn, where yyyy is the current year and nnn is a sequential number (2007-001). I've tried using both a formula and custom formats but cannot get the cell contents to display as desired. I've used TODAY()&"-"&"001", which gives a valid result of 39100-001, but this not what I need. I've tried many other combinations in the custom option for formatting the cell.
View 5 Replies
View Related
Sep 14, 2007
I tried to create a custom menu for a specific file. However, after creating the menu, I posted the file in Sharepoint. When a user download the file from the sharepoint site, the custom menu doesn't work because it is looking for the macro links from my computer. Another problem is that now the custom menu shows up in all other excel files that I open.
My questions are:
1. How do I do it so that the custom menu shows up only when this file is opened up.
2. How do I go about making the menu to look for the macros embeded in the file itself instead of looking for it in my file folder.
View 9 Replies
View Related
Feb 12, 2013
I've written a ton of VB macros that do various things to a raw data sheet. I want now to create a custom menu (in the the menu ribbon bar at the top of the screen). I'd like this menu to be used to activate the various macros for whoever has my add-in.
I've found several examples on how to create an add-in, and creating custom menus, however they all for when someone opens a workbook with the code, and then they remove the custom menu when the workbook is closed. I would like my custom menu to stay on the users ribbon bar no matter what workbook they have open. The only time the custom menu should not appear is if the user removes the add-in.
View 6 Replies
View Related
Apr 18, 2006
I have two listboxes on a userform. One is the "choice" listbox, the other is the "master" listbox. Each item selected is a billing object on a sales invoice.
problem: The master list works fine when the item is selected in the choice list. But when it is deselected, how can you REMOVE it from the master list? question: How can I add a text box automatically to the userform to allow the user to enter quantity info?
For I = 0 To CodeList.ListCount - 1
If CodeList.Selected(I) = True Then
obj = CodeList.Column(0, I)
p = 6
test = 0
Do While test = 0 And p <= 25
If sheetsales. Range("C" & p) = obj Then
test = 1
Else
test = 0
End If
p = p + 1
Loop
If test = 0 Then.........................
View 2 Replies
View Related
Aug 2, 2013
I am trying to find expected proportion of code per country by looking at current values. I have a list of countries and associated classifications (0-5) with counts, similar to as follows:
Country
code
count
USA
1
65465
USA
2
54651
USA
3
65411
[code]...
I am interested in creating a pivot table with the average of each code as a proportion of each country. The final table would be expected proportion of codes. The pivot table for this set would look like this:
Row Labels
Average
1
5.4%
2
3.9%
3
4.7%
[code]...
Mean per code of the proportion of code per country
View 1 Replies
View Related
Jun 9, 2008
I am using the following code to create a custom command menu.
Sub AddMenus()
Dim cMenu1 As CommandBarControl
Dim cbMainMenuBar As CommandBar
Dim iHelpMenu As Integer
Dim cbcCustomMenu As CommandBarControl
On Error Resume Next
Application.CommandBars("Worksheet Menu Bar").Controls("&New Menu").Delete
On Error Goto 0
Set cbMainMenuBar = Application.CommandBars("Worksheet Menu Bar")..........................
I want to add a new button control at the bottom of the menu underneath the holiday control but it keeps adding it on the sub menu, which leads off the holiday button control. I want the menu to look like this.
Open Net 2 Access
Add Employee
Edit Employee
Delete Employee
Holidays (3 options on sub menu)
*New Control
View 4 Replies
View Related
Jul 24, 2007
I'm trying to find a way to make the user select only one of five columns in a row. What I’m trying to get is a ranking of 1 to 5. The user will click a cell and it will fill in or the user puts an X in it. In row 8 I want to select A through E but only one of them. If the user changes their mind and clicks another cell, the first cell clears.
View 9 Replies
View Related
Feb 15, 2014
I'm trying to make a converter between about 8 various types of values. These are not units like Km or miles or something like that, but rather numbers that represent a specific "hardness value" on a variety of scales (to name a few: HRC, HRA, K)
What I've been doing so far is plotting the two types against eachother and then getting the best trendline I can so that I can use that formula to convert between the two with relative certainty. (for example, when plotting HV vs HRC my fourth order polynomial trendline with an Rsquared of 1 is y=0.0001x4 - 0.0188x3 + 1.0768x2 - 20.709x + 350.69)
My questions comes up where I was hoping to make a window or box of some sort allowing the user to input a numeric value, then selecting the Input units and the hopeful output calculated units, and have the box spit back to the user the conversion.
View 9 Replies
View Related
Jun 18, 2014
I am trying to assign rooms to tenants. I would like to set up a function that reads a tenant's top 5 choices for a room, and looks up a column to see if the choice has already been selected before moving to the next choice. Then if all 5 choices have already been selected, the cell reads error.
This is how it would look : Excel Pic.jpg
View 3 Replies
View Related
Apr 24, 2007
I am trying to calculate phone call rates based on several different conditions. *if my phone call has a "DESCRIPTION" of "Local" then I want to add 2 cents onto the "COST" *if my phone call has a DESCRIPTION of "Mobile" then I want to use the formula = SUM(G7*24*60)*0.4+0.1 to calculate the charges *if my phone call has a "DESCRIPTION" of "13 Number" then I want to add 5 cents onto the "COST" I am able to use a formula that allows 2 condition but I have been unable to work out a formula where I can add more conditions.
I have attached a spreadsheet
View 2 Replies
View Related
Jan 23, 2008
When I try to insert an 'option' box in which either a check box or radio button are used, only one option can be used. For each option I have to create a new option. But then, each option can be selected, which defeats my purpose. I want to create an option box where there are two option in the box, but the user can only select one of the options, not both, or neither.
View 2 Replies
View Related
Jan 24, 2008
There is any way to select two item one from listbox1 and anotherr from listbox2 and paste on sheet
View 9 Replies
View Related
Apr 4, 2013
I am working on a grading sheet for our company. I would like users to choose from an option button choice (A, B, C, D, F) for each grading category and I would like to write that to a sheet that corresponds with the graded person. The form will have next and previous buttons to move through the grading process - when previous is chosen I would like the option buttons to populate what was stored in the data sheet. I think I can mottle thru the code individually but with 60 option buttons it may take quite some time.
Can I call an option button choice by "Group"? I started coding individually, but it will take a lot of code - surely there is a more efficient answer. A picture of my form is attached at the bottom of this post.
VB:
Private Sub OptionButton1_Click()Dim Grade As String
If Me.OptionButton1 = "A" Then
Grade = "A"
Else
Grade = ""
End If
untitled.jpg
View 9 Replies
View Related