Macro To Create Dialog Box For User Instruction
Jul 24, 2007
I have a workbook with 23 pages, each running a macro to calculate the final "answer".
I would like to make the title page comman button create a dialog box, listing the 23 pages/macros with a check-box for each (default is "checked") asking the user which macros / calculations to execute. Any ideas how to do this?
I am trying to avoid making this a sheet in my workbook.
View 9 Replies
ADVERTISEMENT
Nov 13, 2008
I have a macro that's running quite well and is cross-posted here:
[url]
What I need to do is allow for user input. I want to create a dialog box that pops up and asks for an input range, when the user runs the macro. Values can only be from 1 - 50. And the user won't be allowed to select broken sequences, like 6, 9, 12-15.
They would have to be continuous, i.e. 6 - 15, etc. I'm still very new to VBA. I can play with the control toolbox, but I have very little understanding of how to interface with the components that I'm adding/creating. Once I have that range, I want to use the inputs as the 'start' and 'stop' points for my loop. So I need to capture the values and pass them as input parameters, I'm guessing.
I can modify the loop to accept the inputs, I'm just not sure how to capture them from a user input dialog box.
View 14 Replies
View Related
Oct 31, 2013
This is what I'm trying to do:
1. When a user clicks on a Drop down box and selects "Add New", I would like a Macro to run
2. I want this Macro to open up a Dialog/Text box to say "Enter New Information" where the user can enter in some text
3. The text that is entered by the user into this box will be added as a new entry into the Drop down box selection
My VBA knowledge is still at a beginner's level and I know how to get a Macro to run based on a cell value. However I don't know how to create a Macro for the dialog box nor do I know how to create a Macro for updating the drop-down items.
View 8 Replies
View Related
Nov 23, 2006
How can I let the Sub carry on to next instruction if Macro1 fails?
Private Sub Workbook_Open()
Call Macro1
' If Macro1 Fails go to next macro
Call Macro2
'If Macro2 Fails go to next macro
Call Macro3
'If Macro2 Fails go to next macro
Call Macro4
End Sub
View 9 Replies
View Related
Dec 24, 2013
I'm use to highlighting two cells, find the plus, and copying a list of numbers down about 10 rows. Is there a macro instruction or VB instruction that will do the same?
Example,
Before:
G1010
G1011
After:
G1010
G1011
G1012
G1013
G1014
G1015
G1016
G1017
G1018
G1019
G1010
G1011
View 4 Replies
View Related
Oct 23, 2007
Application.Dialogs(xlDialogSaveAs).Show
I am using above code and I want to find out whether the user pressed the save button or the cancel button in order to take the next action.
View 2 Replies
View Related
May 5, 2007
I'm working with a worksheet which includes a multiple If tree like this:
=SI(M9=1;'Pre diseno'!$N$60;SI(M9=2;'Pre diseno'!$N$61;SI(M9=3;'Pre diseno'!$N$62;SI(M9=4;'Pre diseno'!$N$63;SI(M9=5;'Pre diseno'!$N$64;SI(M9=6;'Pre diseno'!$N$65;SI(M9=7;'Pre diseno'!$N$66;SI(M9=8;'Pre diseno'!$N$67;'Pre diseno'!$N$68))))))))
(it's in spanish)
But i have a problem with it. I'm trying to enlarge the formula up to ...M9=19...)))))), but excel gives me an error in the formula. What's wrong? Is there a limit for the number of IF's ? what would you do?
View 3 Replies
View Related
Jan 3, 2013
I have some code in a standard module. When I try to run it, it does not appear in the dialog box. The code's below.
Code:
Sub CopyCat(ByVal Target As Excel.Range)
If Target.Column 21 Then Exit Sub
If Target.Value = "Y" Then
Cells(Target.Row, "A").Copy Destination:=Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1)
Cells(Target.Row, "B").Copy Destination:=Sheets("Sheet2").Range("B" & Rows.Count).End(xlUp).Offset(1)
Cells(Target.Row, "C").Copy Destination:=Sheets("Sheet2").Range("C" & Rows.Count).End(xlUp).Offset(1)
Cells(Target.Row, "D").Copy Destination:=Sheets("Sheet2").Range("D" & Rows.Count).End(xlUp).Offset(1)
Cells(Target.Row, "E").Copy Destination:=Sheets("Sheet2").Range("E" & Rows.Count).End(xlUp).Offset(1)
End If
End Sub
View 9 Replies
View Related
Jan 29, 2007
I am very sure that I have deleted all my macro in my excel spreadsheet and saved. However, when I tried to open the file, the macro dialog prompt me again..... I have press alt F11 and confirmed that there is no macro.
View 6 Replies
View Related
Oct 25, 2007
I have a spreadsheet with the following headings:
A
Claims Number
B
Name
C
Scheme
D
Admin
E
Date
I need to create a user form that will "pop up" and ask the administrator to enter the above details.
A - should be created automatically (ie last claim number + 1)
B - user enters manually
C - data retrieved from a list
D - data retrieved from a list
E - date is the date the information is entered
View 9 Replies
View Related
Feb 9, 2007
I want to record a macro that can be used to open different dialog boxes e.g conditional formatting, go to, sort, paste special etc.
what should be the way to record a macro to do this. I have tried it but to stop macro recorder I have to close the dialog box first but in this way it records nothing.
View 9 Replies
View Related
Oct 18, 2005
i have a macro button designed to wipe all user entered data into a workbook. I want it so you cant accidently press (as you cannot undo the operation). Anyway for making a dialog box appear asking if you are sure to wipe date, with a yes or not option.. no will obviously abort the macro.
if possible, another box to come up asking if you want to save the file first with a different file name (comes up with a save as box).
this is the code so far:
Sub MonthCleaner()
'
' MonthCleaner Macro
' Macro recorded 17/10/2005
'
Application.ScreenUpdating = False
Range("A10:G10").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
Range("H10").Select .........
View 9 Replies
View Related
Feb 20, 2007
I am modifying a corporate macro that is used in to create a standard technical letter. This standard file has 6 macros, that once used to create the letter, are never used again. I know, the first thing that jumps out is to create an add-in. I'd prefer not to got hat route at the moment for various reasons.
What I'm looking to do is after the letter is created, and the print macro is called and prints the letter, all macros are removed (already found help for this on this site), then check to see if the file has been saved, or still has the template name, and then either save or bring up the save as dialog box for the user to save the file with the appropriate name and folder.
View 9 Replies
View Related
Jul 8, 2013
I'm looking to create a macro that launches a dialog box upon file launch. Based on the input, I want excel to only show the tab which corresponds to the dialog box entry.
For example, if it asks "What is your name?" on file launch and I respond "Alex"; i want the tab labeled "Alex" to only be shown for the user.
View 1 Replies
View Related
Jul 19, 2013
I am trying to add a simple function to button in Excel.
First I need to select cell G24 as that where the inserted file should be placed on the worksheet. Then on the Add Object window to open but the tab 'Create from file selected.
Below is only part of the solution
Sub ShowInsertObj()
Application.Dialogs(xlDialogInsertObject).Show
End Sub
Also is it possible to detect that file has been placed on the page ? In cell G24?
I am wanting users to attach a required zip file. I then need to check if they have done so.
View 1 Replies
View Related
Apr 19, 2014
Back in IE8, when you tried to download a file, it'd pop up a little box asking if you wanted to download or save the file. Macros in Excel could work through it using code like 'hWnd = FindWindow("#32770", "File Download")' to get the box and interact with it.
IE11 now has an obnoxious little ribbon that appears at the bottom of the window instead of the box, so FindWindow comes up blank.
There are a number of files including .xls, xlsx, and .csv, and there isn't a static link directly to the files, so I can't just put the link in workbooks.open. Also, to get some of the files, there are logins and forms to fill in with dates and the like. I can get through all of that stuff and click the button to download, but it's that open/close button that's stumped me.
Any way to get an Excel macro to interact with that Open/Save ribbon in IE11?
View 1 Replies
View Related
Mar 4, 2007
Stumbling over syntax on what should be easy. I want to password protect the active sheet using plain vanilla user input box; and then unprotect ALSO via an input box. Doesn't matter about masking the input with **** or whatever. Based on responses below, here is macro code I used:
To protect the sheet:
Sub ProtectSecurity()
Dim pword As String
pword = InputBox("Enter Password", "Password")
ActiveSheet.Protect pword
End Sub
---------------------------------
To Unprotect the sheet:
Sub UnprotectSecurity()
Dim pword As String
pword = InputBox("Enter Password", "Password")
ActiveSheet.Unprotect pword
End Sub
View 5 Replies
View Related
Jul 19, 2006
I would like to replace the keyboard shortcut for the macro dialog box
The standard Alt + F8 is on the right side of the keyboard
I would like somethine of the left side such as Alt + Q
View 3 Replies
View Related
Dec 9, 2006
I've forgotten how to prevent the macros from showing in the macro dialogue box.
I'm sure it's got to be something with the VBA editor, but I can't figure it out.
I've got some files where the macro list is hidden and I'd like to do the same again, but for the life of me....I'm stumped. I'm sure it's something very simple.
I've protected the Worksheet & Workbook.
I've done some searching...."macro hide", "hide dialogue" etc. but can't seem to find what I'm looking for.
It's been a while since I had to amend code, as everythings been running very smoothly.
View 5 Replies
View Related
Oct 22, 2013
Would like to be able to have a macro button or code that launches the Microstrategy Reports dialog box.
View 2 Replies
View Related
Jul 14, 2014
I am trying to create a function using the functions of IF and "And", but for any reason I don't know how to add the Add function
My function written in excel will looks like =IF(AND(A80="00",C80<>"8300"),"yes","no")
LOB Cost Center
00 1000
00 2000
00 8300
01 5000
02 8300
Function Allocation(LOB As Integer, CostCenter as Integer) As String
If LOB = 00 And CostCenter <> 8300 Then
Allocation = "Yes"
ElseIf LOB = 1, 2, 3, 4, 5 Then
Allocation = "No"
End If
End Function
View 3 Replies
View Related
Jun 17, 2013
I have a mental block when it comes to writing functions.
In a cell I have the Post Code followed by a "#" sign (no speech marks) and sometimes more text
e.g. FY6 8JF#ABCD (where the Post Code is FY6 8JF)
The "#" sign always indicates where the Post Code ends, i.e. I want to return all the characters to the left of the "#" sign.
In a spreadsheet I would accomplish this with "=LEFT(AA14,FIND("#",AA14,1)-1)"
where the string of interest is in cell "AA14"
How do I write a UDF to do this?
View 5 Replies
View Related
Sep 4, 2009
I wish to create a button which will allow the user to goto the page in my spreadsheet.
I no i can use macros or hyperlinks to do but i can only use this button once for it to work. I want to cut and paste the button to save time.
View 10 Replies
View Related
May 18, 2009
I want to create a user input for a "LARGE" function so that I can then return the specified # of "large" items. i.e. user wants to get the top X number of users, user then enters number either into a dialog box or cell, code then looks at the number and populates a range of cells based on the input value. The current code that I am using simply refers to an existing table (r9:r30) that I then used the auto fill to copy to cells below it.
=INDEX(Sheet2!B$20:B$961,MATCH((LARGE(Sheet2!$F$20:$F$961,$R9)),Sheet2!$F$20:$F$961,0))
I really want to be able to just get a user dialog box going that will automatically populate both the range r9:rx (where X is the user input) and then also copy the above formula into the x number of cells below it.
View 2 Replies
View Related
Jun 8, 2009
Is it possible to use vba coding to create a pop up user form by clicking on a button in excel?
I want to create a pop up form that a user can fill out with fields for name and address information. Then click a button to save and close the form based on the last name field box.
View 9 Replies
View Related
Jul 30, 2009
I am working on a spreadsheet and would like to create a cell that allows the user to input a number (1 to 5) which will then equate to a percentage(%). I would then like this to deduct that percentage from a total number...
To try and explain this.. Should the user input 1 into the cell, this would then equate to 3% - this would then deduct from a total that percentage. Input 2 = 5% etc..
View 12 Replies
View Related
Aug 20, 2009
The example file gives a better visual explanation. Just want to copy a range of cells by pressing a command button. However I want the macro behind it to ask the user which set of rows to copy.
View 14 Replies
View Related
Jan 8, 2009
I'm trying to create a formula similar to this:
=Calculations!(Indirect("N"&A2)-Indirect("AB"&A2)+Indirect("AA"&A2)
The idea is that the user will enter a value in cell A2. That number will determine the appropriate rows in the formula above.
View 6 Replies
View Related
May 7, 2007
The app. that I have been developing requires the user to create a formula in a combobox in a userform that I have setup for them.
They have a list of variables that they can choose from, which they are allowed to use in their formula creation.
A typical formula may look like this:
=SUM(25*DistFromBack) where DistFromBack = 4
I then take their formula and place it out on the sheet which returns me a value of (in this case) 100.
Now this works fine until someone wrote a formula that looked like this:
=SUM((25*DistFromBack)
Now with the double brackets at the front it creates a formula that Excel cant deal with and gives me a 'Runtime error 1004'.
I have tried to trap this error (On Error Goto .....) but unsucessful.
I would really like to have a check when the user types an erronous formula, but dont really know how to go about it.
View 13 Replies
View Related
Nov 20, 2008
I'm trying to create a dynamic array so that when a user enters the first sheet name via an input box, excel will know to select the other sheets with ending (2), (3), (4) etc.
Currently this code works only if there are 4 sheets present (as I set this way), anything lower/higher is out of range.
How do I make it so that it will select sheets if there are less than 4 sheets present?
I tried nesting, but I pretty sure this array needs redimming or something. Is ubound a better option?
View 5 Replies
View Related