I am creating a status board at work... Kinda like an In/out board.
I created a toggle button and using it as the persons named. I want them to be able to go to the excel sheet on our intranet. Be able to click their name (toggle button) and it change the off cell from red to white and the on cell from white to green. Then they can save the excel sheet and close out for the next person.
edit: I would also need it to go back once they click it when they leave.
I have created the active x button, but so far the only thing I can do is get the 1 cell it effects to say true/false.
Is there a way to change the text on a toggle button in the code below? Basically I would like for the toggle button to begin with the word "START" on it and then when clicked changed to the word "STOP". Of course then when the user clicks on "STOP" it changes back to "START".
I would like to set the value of a toggle button when the userform is opened so that it coincides with the what columns are hidden on screen. Below is simple example which I have not tested or debugged. It was just what i was thinking.
Sub Macro2() 'if col A is hidden If Columns("A").EntireColumn.Hidden = True Then 'make hidecalcs toggle button true (sunken) Userform1.HideCalcs.Value = True
I have read several articles saying using a command button as a toggle button can't be done but some articles have said it is possible using the state properties.
.State = msobuttondown .State = msobuttonup
Is there any way to combine this with the onaction property so that when you press the button, it stays down and activates a macro then when you press it again it pops back up and activates another macro.
I have several buttons which, when clicked, pull up a range of data from another tab. Each button repopulates the appropriate cells with its specific data. I need to have an identification of which data set I'm currently viewing so was considering having the button, when clicked, change color or background/lettering colors swap, etc, until another button is clicked, then it changes color and the original button returns to the standard format. Is this possible? What type of button do I need to use?
Dim r As Long Dim c As Long Dim s As Worksheet 'Set s = Active.Worksheet( Name) Dim Error As String ' Dim ws As Worksheet Dim ValorMensaje As Long
'Turn off Screen refresh Application. ScreenUpdating = False
'Use Cells(Row, Column) for range adddress r = ActiveCell.Row c = ActiveCell.Column ..................................
How can I simultaneously with this code put data from textboxes to Active sheet and sheet "Izpisi". So when the button Add(dodaj) is pressed the data goes to active sheet and sheet ("Izpisi") at the same time
I am trying to do is if a user hovers the mouse over a commandbutton, the button will change color and the label will tell the user what that button does. This works almost perfectly except that if the user goes directly from one commandbutton to the one directly next to it, they the previous commandbutton does not change back to it's original color. It will only work if the use first move away from the first commandbutton and then hovers over the second.
Private Sub CommandButton20_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single) Me.CommandButton20.BackColor = RGB(149, 28, 2) 'orange Me.Label1.Caption = "No changes can be made."
Private Sub CommandButton18_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single) Me.CommandButton18.BackColor = RGB(149, 28, 2) 'orange.................
I have a series of 12 option buttons on my spreadsheet named Opt_1 thro' opt_12. Whenever one is pressed, I want to invoke code to action the following:
change forecolor of non-selected option buttons to yellow change forecolor of the selected option button to red Enter in Cell A1 the number of the option button slected
So, for example, if Opt_4 was pressed, then
Opt_1 - Opt_3 & Opt_5 - Opt_12 forecolor = yellow Opt_4 forecolor = red Cell A1 gets the value of 4 entered into it.
I know how to do this on a user form, by putting the option buttons in a frame and then picking up the array value of the option button, but I have these directly on my spreadsheet next to 12 cells as this is more relevant to my application.
I thought of a Select - Case statement, but this will be rather lengthy. Have you any suggestions on how to tighten this code down.
I have a table of data which contains company names, the number of high risk policies, number of low risk policies, and the percentage of high risk policies (compared to total policies).
What I want to do is for people to be able to select up to six of these companies and press a button that says 'create graph' and it creates a graph which shows the number of high risk and low risk in a stacked bar, and the percentage on a separate axis as a line. I know how to manually create this graph no problem, but to be able to dynamically create one from selected companies would be awesome.
To start with I have created six drop downs where you can select the company name as I image the macro will need to know which companies' data to look for in the source table.
I have made an excel workbook detailing team performance that all of my team have access to and that requires updating once a day. The first person to access the workbook each day presses a Command Button that updates the workbook and inserts a time/date stamp. However, other members of the team go into the workbook and update it again the same day which then affects the data being reported.
I know i should probably just sack them for not being able to read the time and date but HR would not like that so is there a way to disable CommandButton1 (ActiveX) so that once it is pressed it is disables until the next day?
I have a situation with a spreadsheet i'm working on.
Basically, when a button is pressed I want it to search for all rows which have a "yes" in an offload column (Column AS, on the sheet "Active") (So it can be yes or no).
If it finds a yes, I need it to move the whole row in to a new sheet called "inactive", then move the remaining results up.
I have taken and played about with a different VBA code, but i'm not sure it's even the right line!
Here is what I have :
Sub Refresh() ByVal Target As Range) If Target.Column = 45 Then If UCase(Target.Value) = "Yes" Then Target.EntireRow.Copy Destination:=Sheets("Inactive"). _ Range("A" & Rows.Count).End(xlUp).Offset(1) Target.EntireRow.Delete End If End If End Sub
I have created a button name "Add Power Source" on excel sheet that adds a table and a button(named "Add Row") to the sheet.Whenever the user clicks the "add power source" button a table and a "Add new row " button is created .This "Add new row" button is used to add rows to the table. Now suppose the user has pressed the "add power source" button 5 times,so that there will be five table on sheet and each having a "add new row " button associated with it.When the user wants to add a new row to the table 2 say .How will I come to know in which table the rows are to be added using VBA.
I have a workbook with about 53 worksheets one for every week in the year. They are named as follows: VA-1-1-09 TO VA 12-28-09 All sheets are hidden except the (VA-1-1-09)
What I am trying to do is create some logic that would keep all 52 sheets Very hidden except sheet VA-1-1-09 Till the second week starts at that time what I would like to see happen sheet VA-1-5-09 come out of very hidden and appear visible and send sheet VA-1-1-09 to just a hidden state. I like to have this happen for every week of the year? If this can happen automatically that would be great however a command button clicked once a week would do the trick as well.
i want the user to be able to change the cell color on the click of a command button. the worksheet is protected. when the user click the command button the active cell changes to red and offsets by 1. then the work sheet is locked again.
The two problems I am having is 1. I want the range to begin from row 10, column k to column FD. all cells down
the second problem is the current code allows me to edit locked cell columns A to J ...
Is there a way to get a sound toggle button on excel?
What I need is a button to turn the sound alerts on and off on my spreadsheet. Ideally I'd like a button that either changed an image to the speaker image when on and the speaker image with line through it when off. Is that possible?
If not, is it possible to have a button that just says: "Sound:ON" or "Sound:OFF"?
I guess it could be done with tick boxes, or drop down options.
I have the code below for creating a stopwatch in excel. I was trying to see if there is a way to change this code to assign it to a toggle button so if you hit one part the stopwatch would start and then the other it would stop.
I wanted to know how do I keep a toggle button in the on(ture) position after I close the userform? How do I keep the toggle button off(false) positoin after I close the userform? In order words, once I run my macro again, I want it to remain in memory that my toggle button was in the on(true) or off(false)?
For example,I have an application that I am developing which involves some what-if analysis for some projects. There is a command button located on my worksheet. After the command button is clicked, I have include some toggle buttons on a userform for all of the various projects. If I assume that sine projects will not be used, I click the associated toggle buttons. This puts them in the on(true) position. After I close the userform and reclick the command button, my toggle buttons are all back in the off(false) position.
I need a macro for button1. The name of button one is "on" when clicked I want it to put an "X" in A1 and then change the button name to "off" When clicked again I want it to delete the "X" in A1 and change the name back to "on". When clicked again it repeats the same process.