Making Dialog Box With 3 Options To Run Macros?
Jul 31, 2014i'm trying to make a simple dialog box with 3 options:
run macro 1
run macro 1
run macro 1 & macro 2
ok or cancel
what's the simplest way of getting it done?
i'm trying to make a simple dialog box with 3 options:
run macro 1
run macro 1
run macro 1 & macro 2
ok or cancel
what's the simplest way of getting it done?
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.
I've created an Add-in (.xlam file) in Excel 2007 and installed and activated it (it shows up under "Active Application Add-ins" on the Add-in menu for new workbooks).
I can see the macros and code when I go to the VBA editor, but the macros don't show up in the regular macro list.
I know that I can write code for the new workbook that will reference the Add-in code, but I want other users to be able to install the add-in and run the macros in it right away without any knowledge of VBA. Is there a way to make this possible?
I have created a spreadsheet containing about 30+ macros and then copied it with a new title eg, sheet2013.xlsm (original) and sheet2014.xlsm. My problem is that every time I open the 2014 sheet it re-connects to the macros in the 2013 sheet (if this makes any sense). Is there a way to lock macros to a spreadsheet, ie open both sheets and use the macros within those sheets?
View 1 Replies View RelatedI used the "Call" command instead of "Run." Everything finally worked perfect!!
Being new to VBA I do not know the reason behind the "Run" command being different and causing my problems. BUT "call" sure is the answer to my recent irritations.
After I got the darn things to finally work, I decided to do the responsible thing and use Option Explicit, which helped me clean up my code tremendously!!
I have an Excel 2003 program that contains macros. One of the macros hides certain command bars and disables the worksheet menu bar. On close the opposite is true. The problem is, if a user uses the disable macros when opening then the worksheet menu bar and other command bars are still available. I would like to hide all of the data sheets and display another sheet that would normally be hidden displaying a message that the macros have to be enabled for the program to work correctly if disable macros is chosen. When the enable macros are used I would like the Error page to be hidden.
View 6 Replies View RelatedI have a user that keeps a maintenance log in an Excel worksheet and sends an updated copy once a week to a board member. Two weeks ago, the board member started complaining that he was prompted to enable/disable macros on opening and became worried when my user stated that no macros were used in the book. He is now concerned that we have sent him a virus.
I know the file is clean because I've scanned it, and when I look at the file in VB, there are no modules or classes present just the Sheets 1-3 and the ThisWorkbook file. None of these objects have any code in them. My user does have some macros in PERSONAL.XLS but they are not used in the workbook in question.
No one else gets the prompt for enabling/disabling macros. Even if I set my security to prompt for any macros, I get no message. I'm convinced that there must be some setting in his Excel that is causing this individual to get this message. Is there anything else other than a macro that would cause this?
What is the commands or script for deleting a macro automatically using
another workbook macro.
Is there a way to hide a macro from the list where you choose which to run, but not in the VBA editor? The userbox I just created calls upon 2 different macros, and has a macro to bring up the userbox. I need a way to hide the macros in Module3 from selection, but keep the macros in Module4 available to choose to run.
View 9 Replies View RelatedI am trying to write a formula with the following:
-if I9=0, then write 0
-if I9=501, then write 1
-if I9=502, then write 2
What would be the best way to write this formula? I am sure this should be pretty basic, but everything I try comes up with an error.
i am currently designing a userform which has a drop-down box for user to choose from the options given. However, i would like to have in the box fields such as "--Subjects", "English", "Maths", "Science". In this way, the user will be shown a list of options of the different subjects for them to choose from as well as to clearly identify to them that these are the subjects available therefore the heading "--Subjects". I would also have to make sure that the user can only select "English", "Maths", "Science" and NOT "--Subjects".
View 11 Replies View RelatedWe have developed an Excel workbook with hundreds of lines of VBA code written for a specific application, and we would like to protect it.
Could someone give me an idea of what security options we have over and above the below (if any)?
We have protected all sheets and the workbook itself with passwords. The VBA itself is protected with a passoword.
My understanding is that VBA can be hacked into quite easily.....is there any way of adding another layer of security/protection without having to move to another platform altogether?
numbers in one column need to be rounded to the nearest half decimal, with next conditions(ill took number 704,00 for example):
- if last two decimals are < 0,25 then my number has to be 704.00
- if last two decimals are >0,25<0,75 then my number has to be 704.50
- and finally if last two decimals are >0,75 then my number has to be 705.00
I tried with IF, CEILING, INT and ROUND functions but i didn't made it work with three options, that i need. I only made it work if i use only two options.
I would like to know how do I go about adding the following:
This is a test it counts out of 1250 points
But there are 3 fields which can be omitted from the grand total of 1250
Some students might not have all three fields. The fields totals are 30, 90 and 130. The students might have one or two of them in either order. Now what I would like to do is have 3 different fields where I can mark with a Y=Yes and N=No in a block. then it would change the Grand Total score accordingly.
How do I filter the options in column A to bring up results in Column B. I want to do a one-many filter where if the user selects an option in column A then the results/values in column B should be based upon the the user selection.
View 9 Replies View RelatedI recently added a macro in excel that stopped users from cutting and pasting and dragging etc. I got the macro from the web. I have delete the macro, but for some reason I cannot get it back to normal. If I right click on a cell the cut, copy, insert, delete, format cell menu is grayed out. The undo button also does not work? I have searched for the macro and deleted it but it seems to have changed something else. I have even tried to disable macros, but all menu items are still gone?
View 9 Replies View RelatedI use several different workbooks during the day, and sometimes I would prefer the " move selection after enter direction" option to = "Right" and sometimes "Down". It doesn't seem to be an option that is saved with the workbook.
what could be done to a workbooks code to change this option upon opening the book?
I have a userform that prints out pages using a autofilter, the code in the userform prints out 13 different criterias from the autofilter. But the problem is i have no control over what criteria i can print out. Theres the
ActiveSheet. Unprotect ("seasons")
Sheets("Day Handover").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Sheets("Activities Pick Sheet").Select
Selection.AutoFilter Field:=1, Criteria1:="1"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Selection.AutoFilter Field:=1, Criteria1:="2"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Selection.AutoFilter Field:=1, Criteria1:="3"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Selection.AutoFilter Field:=1, Criteria1:="4"......................
So i have design another userform that will able me to control what criteria can print out using checkboxes. But i don't know how to code the new userform so when i select a checkbox it removes that criteria from the code in the first userform called 'frmPrintOptions' and when deselect the checkbox it puts the criteria back in the code. Also the Second userform called 'frmAutoPrint' must remember what checkboxes have been selected and deselected.
I am currently having trouble getting =IF forumla's to work, with more than 3 options AND an equation being taken into account. Attached, is an example of a spreadsheet, involving what I currently have, with Row 5 showing the formula's I've used, and rows 2-4 showing examples of 'Yes', 'No' and 'Equal' outcomes.
For Column E, I would like the value from the above cell (set to zero in the formula of the first cell) to:
-Go up 1 digit (from the above cell's value) for a Yes in that rows C cell
-Go down 1 digit (from the above cells value) for a No in that rows C cell
-Go up 2 digit (from the above cell's value) for a Equal in that rows C cell
As can also be seen from my example, I only have it working so that 'Yes' in C will take the value up by 1, and anything else (including 'No' and 'Equal') going down a point, which is only really using 2 options. I have tried numerous different possibilities for trying to get this to work, all of which gave me #VALUE error, or wouldn't even let me accept the formula. My current formula for what I have now (with only 2 options) is
=If(C5="Yes",E4+1, E1-1)
Basically, if possible, I would just like to make the E column change from 2 different ways (e.g +1 and -1) to 3+ different ways (e.g +1, +2 and -1).
I have a spreadsheet that I access over a citrix network, when I opened it at the start it gave me an option to enable or disable refresh external data, also enable or disable macros both of these are gone now and I have searched the net to find a way to get them back.
View 2 Replies View RelatedI'm building my first Add-In, which I'm using to gather all Sub's that I've created through my small VBA writting career. The thing is that when I write new code and some reason exit Excel and forget to save the XLA, obviously the code is lost. I've used:
View 4 Replies View RelatedI 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
ive created a spreedsheet for work calculating money etc from different tills. is there a way i can have a box appear when the spreadsheet is opened asking for particular information to be entered.
EXAMPLE: ....
I have created a worksheet with Excel Dialog worksheet. I have Edit Boxes and have input data into them. Is it possible to add these data and put the result in another Edit Box,
View 9 Replies View RelatedI've written a function macro that results in a dialog box popping up as in ....Application.Run "showsampdat"
What is the general Syntax for adding a macro line that will enact the OK Button on the Dialog box so that the user will never see the dialog box but the OK button functions?
I have created a dialog box for entering data into once that data has been entered i want the dialog box to store the data into a separate worksheet at A2 in then want the dialog box to clear and reappear ready for new data to be entered. This new data would then need to be entered at A3 etc etc etc. Is this possible and how would i go about doing this.
View 9 Replies View RelatedI 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 RelatedAt the moment I have to click in the cell and then look at the cells used and look across to the title of the rows.
So for example, performance = D3*D4*D5*D6
I would like, performance = vehicles*availabliity*utilisation*TKM.
That is easy if I have just 1 option. But what if I have 3 options? Naming each cell would be a way to do it but pretty laborious, is there a 'smart' way to use named ranges here?
I have created a drop down list, but when selected the text is really small. I know this is because I am zoomed out, but if there any way for the text to be larger so that I can zoom out and still read what the options for the dropdown list are?
View 4 Replies View RelatedI have a table with a list of names of some products and their substances, firm, package and price.What I need to do is this. When I type a certain name in another sheet, I want it to show me a cell with the substances, a cell with the firm (that are fixed and cannot change them) and then in the next cell to give me options (if I type "package 1kg" to show me the price of this package, if I type "package 0,5kg" the price of this one, etc.).
View 6 Replies View Related