One Button To Run 2 Macros Separately
Nov 20, 2011
I have 2 macros, one opens a group of hidden columns to show the info, the second hides them again.
I would like to put a button to run both, so when you click it once they open, click a second time the close up again.
View 3 Replies
ADVERTISEMENT
May 10, 2014
How can I execute two macros with one button press?
the sub names are CDO_Text and CDO_Mail
View 2 Replies
View Related
Jan 16, 2009
How would i go about assigning three sub routines to one button so that they all activate when a command button is clicked.
View 3 Replies
View Related
Jan 23, 2009
I have 1 button that opens 1 workbook within a sheet. How can I give a person that clicks 1 button a choice between 3 macros? So I have 3 macros in a sheet that open different workbooks. The problem is I don't have room to make 3 buttons... so I was thinking if there is a way to press 1 button and get 3 options, that would be cool! Also, I don't think someone would identify the document by the name of the macro because I have a foul way of naming my mac's. Click one button and see a message like "Would you like to open Button1 Button2 Button3" something like this!
View 3 Replies
View Related
Mar 16, 2012
I have code in my macro that outputs a radio button for every project that is entered into the database. All radio buttons are part of the same group. I know how to give the radio button an caption name but I do not know how to give the radiobutton an actual name that I can call to. How can I do this in excel macros?
View 9 Replies
View Related
May 19, 2009
how to disable combobox on radio button click in excel macros'
I have 2 radio buttons: optionbutton1 and optionbutton2 and two comboboxes: Combobox1 and Combobox2.If i select 1st radio button 2nd combobox should be disabled.Vise versa
View 9 Replies
View Related
Mar 26, 2014
Is it possible to use design mode to create a button for multiples macros?
What i want to do is create like a list, and every selection run a different macro. I have a report that i want to use macro to make different filter selections, it would be about 20 different filters combination, so 20 buttons would be a mess... Is that possible or can i do it in another way?
And is possible to link the filter value to a different cell?
View 2 Replies
View Related
Dec 23, 2009
I'm verrry new to editing VBA code and I've been trying to figure out how to send a column of data ("Min Data" AB3:AB21 from "Sheet1") to a worksheet ("F4" - Min) and sending another column of data ("Max Data" AC3:AC21 from "Sheet1") to a different worksheet ("F4" - Max) by using only the one button ("Record Data" from "Sheet1"
I've been trying to figure out ways to edit the VBA in "Module 1" to make this work
Can anyone help me out here? If what i'm asking for isn't clear enough, just let me know and i'll try to explain in more detail.
View 6 Replies
View Related
May 16, 2014
See attached file illustrating exactly what I'm trying to do.
I won't repeat the exact same things I wrote in the file, but the Summary is that I need to first make such that only certain check boxes can checked at any one time, then make the command button run certain macro(s) depending on which boxes are checked.
View 8 Replies
View Related
May 12, 2013
In reference to my other topci here: Userform Error
In this workbook I have successfully made it act like a userform calculator, the user does not ever see the actual sheets in the workbook, their only interface is the Userform calculator I created.
This is exactly how I want it, they do not need to see the sheets, nor do I want them to.
This leads me only to my next problem... Some of the users obviously wont have Macros automatically enabled, what I am wondering is, is there a way to put the normal "Enable Macros" button which appears along the top of a macro containing workbook when opened, I want to put this button into a userform like display without showing the workbook at all.
So here the process I envision:
1. User double clicks the file
2. It opens and automatically goes invisable (like it does already)
3. If the user does not have macro enabled, a userform like box appears and says "Please enable Marcros to user" with a button below for "Enable" and "Exit"
4. If exit is pressed excel closes
5. If enabled is pressed Macros are enabled and then they will automatically see my calculator userform like normal.
As you see, at no point do I want them to see excel or a workbook, just userforms so its not like they are using excel at all.
I have searched around the net and found a few ideas to tackle this, mainly one that has a "Prompt" workbook that shows when macros are disabled, but that is not ideal for me. However perhaps I could just edit this "prompt" code thing for my situation?
Here is the prompt sheet code I talked about:
Code:
Option Explicit
Private Sub Workbook_Open()
With Application
[Code]....
How to use:
Open an Excel workbook Select Tools/Macro/Visual Basic Editor in the VBE window, select View/Project ExplorerSelect the This Workbook module Copy and paste the code above into this ModuleNow select File/Close and Return To Microsoft Excel Don't forget to save your changes...
8. Name one of your sheets "Prompt"
View 2 Replies
View Related
Jul 9, 2014
I have created a individual tracker spread sheet in each user system and on the spread sheet I have inserted 2 buttons in 1st sheet. when employee wants to take a break he has to click on the log out button and when he came back he needs to click on login button. I have another sheet named "timings" and I have created 2 columns, one is login and another is logout. What I need is when user click on the login button, the system time and date to be auto update under login column and when he clicks on logout button the system time and date to be auto update under logout column.
View 14 Replies
View Related
May 30, 2009
A friend of mine prepared worksheet. In column "A" up to 800 entries representing household appliances. In column "B" their prices in two currencies. To be exact in USD and EURO.
So he formatted prices column. For example TV 1500 $, smoothing-iron 99 EURO. and so on. So I need to sum USD values in C1, and EURO values in D1
I tried many text formulas and other formulas from MOREFUNC.XLL, but no result..
View 7 Replies
View Related
Apr 5, 2005
When I open more than one Excel file, it used to display them as separate icons on my task bar. But for some reason, now I only get one one icon, and I have to go to Windows on the Menu Bar to switch between them. I can't use Alt/Tab anymore. It only affects Excel.
View 4 Replies
View Related
Sep 30, 2007
For Example, I have a list of numbers like this
3
-4
6
5
-2
Now, I need to get the sum of all positive numbers & sum of all negative numbers in different cells. Is it Possible to get using Formulas.
The Order (& also the number) of the Positive & Negative Numbers varies.
View 14 Replies
View Related
Apr 24, 2008
I have a question regarding automating excel sorting in Excel 2007. Here's what I have, I have a sheet that I need to sort on a weekly basis as the data is always being updated. Here is what i am basically doing with sheet and I am using a MACRO RECORDER to automate it.
1) I select column2 ~ column 7 (B:G)
2) I sort with the following order.
- column 3 (column C) ascending order, then
- column 4 (column d) ascending order, then
- column 6 (column f) ascending order, then
- column 2 (column b) DESCENDING order.
everything from this point on, it's repeatitive. I select..............
View 4 Replies
View Related
Jul 11, 2014
How can i keep the data in a seprate sheet & percentile ranges for the data in another sheet.
View 1 Replies
View Related
Oct 8, 2012
I have 199 tabs in which i have, for example, sales data month by month. I want to consolidate into one tab the total sales per tab. I.e. so that i have a list of tabs 1 to 199 with the sales for the year for each tab. I don't want to sum the same cell across each tab.
Is there a way of doing this without having to do 'sum(tab1...)' for my tab 1 sales and then 'sum(tab2...)' for my tab 2 sales etc?
View 2 Replies
View Related
Aug 6, 2009
I have a column which is populated with profits and losses from a trading account. Here is an example:
Column I
400
200
-100
-150
-50
What I want to do is average all the profits, and average all the losses so I have two numbers - the average winner and the average loser. Continuing with the example from the 5 trades above, the average winner is 300 and the average loser is -100. How can I do this in excel?
View 3 Replies
View Related
Nov 15, 2012
I've been trying to loop data for column A from row 1 until 6 and print the result on specified cell. But the problem is, it keeps looping until column B,C and D.
I want to calculate average result separately for column B,C, and D without taking the previous data.
Here is the code that I've done.
VB:
Sub Avg()
col = 1
Row = 1
Do
Name = ThisWorkbook.Sheets("Sheet2").Cells(Row, col).Value
If Name <> "#" Then
[Code] ....
I attached my excel. The green box indicate the result that I want : function.xls
View 5 Replies
View Related
Mar 24, 2013
many times i am confrunted with excel files containing one sheet that has many tables on it. i need to print each table so that it fits on one page, but these tables are not formatted so that they fit, therefore i need a fast way to make each table fit on 1 printed page, no matter how big it is or how it is centered on the page size from page layout(many times the table is bigger than the page layout size). i tried selecting each table holding down ctrl and then hitting set print area, but most of the times this doesnt work, i still get part of the first table and the begining of the second table on the second printed page and so on, which is not good.
View 9 Replies
View Related
Jun 6, 2014
I have a workbook has a "Summary" worksheet. I would like to be able to do the following:
(1) Sort columns D, G, J, M,... (the number of columns are different each time I run the macro that I have).
(2) create a combo box to be able to the data (that sorted in 1) by month (1,2,..., 12).
see the attached file
View 5 Replies
View Related
May 20, 2014
I have a worksheet that contains multiple task lists, each having two columns, a "Priority" field and a "Description" field. The data should be sorted by Priority first and by Description second. The header row is 5 and the data is in rows 6 through 50. The first list is in A5:B50, the second C5:D50, and so on until the sixth list in K5:L50. I have a macro that works for one task list, but cannot get it to function for multiple task lists. Below is the macro that functions for the first task list. It is in the code for the sheet tab.
Option Explicit
Private Sub Worksheet_Change(ByVal Target1 As Range)
If Target1.Column = 1 Then
[Code]....
View 1 Replies
View Related
Aug 26, 2009
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 Related
Jul 28, 2008
I 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?
View 9 Replies
View Related
Mar 30, 2007
I have a workbook that has a total of 44 tabs; tab 1 = 'Summary' and then 'T1' through 'T43'. When I go to print the workbook, I do what I always do with other workbooks: I select all sheets and hit Print. On this workbook, tabs 'T15' through 'T43' print first, and then 'Summary' through 'T13' print. Tab 'T14' does not print unless I print it separately from the rest.
I am not using any code to do this printing. I am right-clicking on a tab and selecting all sheets and then using the standard Excel toolbar or File...Print menus. When I view it in Print Preview with all sheets selected, T14 is there and looks fine. There are no extra page breaks that I can see.
View 4 Replies
View Related
Jul 23, 2005
What is the commands or script for deleting a macro automatically using
another workbook macro.
View 9 Replies
View Related
Jul 14, 2008
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 Related
Oct 8, 2009
I have this table
.......A.....B.....C....D
1.....I......a.....d.....g
2.....II.....b.....e.....h
3.....III....c.....f......i
As you can see, the number I has a,d,and g, II has b,e,and h, and III has c, f, and i
I want to make formula that if I make the input g it would return I, f would return III, and c would return III, and so on
I want to make four formulas by using VLOOKUP, INDEX, MATCH, INDEX&MATCH separately.
View 9 Replies
View Related
Nov 11, 2011
I have a togglebutton for an excel sheet in use for scoring psychological tests. When pressed, the button higlights the cells where a raw score is inserted.
What I need is a code to higlight the togglebutton when pressed, eg. green (colorindex 4). The button is white. How to do this?
Below is the code, It has more lines than needed, but it works.
Private Sub ToggleButton1_Click()
'FKV TOGGLE'
ActiveSheet.Unprotect "manisk"
If ToggleButton1 Then
[Code] ........
View 2 Replies
View Related
Mar 7, 2008
I received this code from an example I found once upon a time that was originally submitted by someone else. Right now the code enters the current date in a cell of the same row as the checkbox when it's checked. I need to revise it, or come up with something similar, that will reference the value of a cell when it is in the same row as the button (from the Forms toolbar) that is clicked to activate the macro. First of all, I don't know how to reference a Forms button in VBA.
Sub Process_CheckBox()
Dim cBox As CheckBox
Dim LRow As Integer
Dim LRange As String
LName = Application.Caller
Set cBox = ActiveSheet.CheckBoxes(LName)
' Find row that checkbox resides in
LRow = cBox.TopLeftCell.Row
LRange = "B" & CStr(LRow)
'Change date in column B, if checkbox is checked
If cBox.Value > 0 Then
ActiveSheet.Range(LRange).Value = Date
'Clear date in column B, if checkbox is unchecked
Else
ActiveSheet.Range(LRange).Value = Null
End If
End Sub
Here is some other code I already created. Unfortunately, because I don't know how to do the row reference, I had to create 25 different macros, which just bulks up the size of my file and slows it down. But here is what I'm trying to accomplish in my macro:.............
View 8 Replies
View Related