When Cell Clicked, Stays "clicked" Highlights All
Jan 10, 2007
What in the world did I do now? When I click on any cell, the cursor turns into a thick "+" . Then, when I move my mouse up and down the spreadsheet, all the cells the "+" touches become highlighted.
View 9 Replies
ADVERTISEMENT
Feb 23, 2007
I've seen a spreadsheet where the user can click on a cell, and the row the cell is in automatically highlights.
This is useful where there is a lot of columns, and it also looks pretty snazzy!
How do I do this? I know one way is to put the following code in when you right click the sheet tab and choose "view code":
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
UsedRange.EntireRow.Interior.ColorIndex = xlNone
ActiveCell.EntireRow.Interior.ColorIndex = 6
End Sub
But then I can't have nice background colours for other cells. Any suggestions?
btw, I've v. new to VBA - best to assume I know nothing!
View 9 Replies
View Related
Jul 16, 2014
When I am in my workbook and I click on a cell in a worksheet I would like to be able to have the row highlight when I click a cell, instead of trying to manually find it which at times I get lost with all the data on these sheets. Now my workbook is completed and all my formulas are done. Just trying to fine tune my databases with being able to do the "click this cell and the row highlights where I need to be" If this is possible I would like to do this for all 3 databases.
View 14 Replies
View Related
Jan 19, 2008
Is it possible to modify the following codes so that if the active cell is formatted as Date when the cell is clicked the pop-up calendar shows.
View 11 Replies
View Related
Oct 2, 2009
I need some VBA code which will insert a value into the cell when clicked.
First click = Value: 1
Second Click = Value: 2
Third Click = Value: "" (BLANK)
Cycle back to first click.
View 4 Replies
View Related
Apr 26, 2007
The idea is that once macro is started it will add the value of any clicked cell into the formula of the original cell.
ie.
1.start macro
2.click cell a5 (value=36)
3.type '+'
4.click cell b7 (value=21)
5.click enter to end macro
Result will be '=36+21' in the formula bar. The cell will then show the answer 57.
View 9 Replies
View Related
May 17, 2014
I have 5 columns in excel and a value in each column, i.e. J23, L23, N23, P23, R23 (I have left columns blank in between each one).
The values in J23, L23, N23, P23, R23 are all different.
I'd like to place a Checkbox underneath each of these cells (each checkbox being specifically for the value in the cell above it) so that when I click one of the checkboxes, the value that is linked to that checkbox is then copied into another sell, for example Cell J31.
View 9 Replies
View Related
Jul 29, 2008
There was a similar question I found answered in the archives. However the solution given there (using ActiveSheet.Buttons(Application.Caller).TopLeftCell.xxx) does not work in my case.
A little googling and I think the reason is that I added my buttons from the toolbar and not from the forms editor. My buttons are in the OLEObjects collection, not in Buttons.
So how do I determine which of my OLEObjects was clicked? Is there something similar to "Application.Caller"?
View 9 Replies
View Related
May 26, 2006
I've found a great thread that answered part of my problem (Change colour of text on update of cell)
This code changes the colour of a cell when selected. With the application I'm trying to make I need this effect to only occur in a certain area say A10:D30
I'm trying to make a scheduling page that uses timebars to represent when people are working. I though if a user could click or highlight the hours and a time bar produced I could lookup to see what hour the timebar starts and ends and show the hours worked. I also need it to cycle through 5 different colours before returning to white.
Private Sub worksheet_change(ByVal target As Range)
target.Interior.ColorIndex = 4
End Sub
View 9 Replies
View Related
Dec 27, 2009
I have a column with entrys of 2 kinds. Some being Hyperlinks and others with normal type data. All cells are locked with password except for cells that will possibly have entrys made in them.
Is there a way to move the active cell to R1C1 after any hyperlink clicked? R1C1 is unlocked.
View 14 Replies
View Related
Sep 3, 2009
i am working on a spreadsheet that is doing two things 1) its allowing the user to choose between 1 to 3 number or N/A from the list validation option and 2) there is a checkbox if one selects that all the columns that have the formula will become N/A irrespect of data in it. I am using the following formula in the list validation option a3 is the check boc.
E5 =1
E6= 2
E7 = 3
E8=N/A
=if(a3=true, $E$8, $E$5:$E$8)
The issue I am having with this is, if I start selecting something from the drop down and half way I realize I need to check the box, it will only make it E8 value for the cells I have not touched and the ones I have already selected the drop down value it will remain. However I want it to override the value to E8 irrespect.
1) If the user of the spreadsheet clicks on the check box (this is in A3 cell) which i have linked it using format control then all the cell (Column E) that have the formula =if(A3=True, "N/A", ) will have N/A which is not applicable and not an error as you mentioned. I have successfully implemented this
2) If the user does not select the check box (a3) then each of the cell (Column E) has a drop down which the user can select either 1,2,3 or N/A. Which I have successfully implemented by using the data validations. Now the struggle I am having is as follows: I have attached the spreadsheet for your reference too.
Now if I select number 2 in cell E10, 2 in cell E11 and 3 in cell E 13 and you can see alll the other cell in column E are 0, because of the formula and the box in A3 is not checked in Tab 1. In Tab 2 I have checked the box everything turned N/A in column E except cells E10, E11 and E13 because I had previously selected 2,2,3 respectively. This is not what I want, what I want is when I check that box everything should turn to N/A basically an override function is what I want to created.
View 3 Replies
View Related
Jul 31, 2008
I have a sheet where it has got hyperlinks to many cells. When I click on the Hyperlink, the destination cell selected should start blinking.
View 9 Replies
View Related
Jul 26, 2012
how to remember or pass the place where the user doubleclicks. I am trying to make a form show up when a certain range is chosen. For now this range is static, but it will be dynamic in the future. Once the user double clicksa cell in this range, the form pops up.
Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Application.Intersect(Target, Range("M4:AF23")) Is Nothing Then
Cancel = True
[Code]....
View 3 Replies
View Related
Jan 29, 2008
I have a spreadsheet with contact information in it. I am trying to figure out a way to count how many times I click a contacts email address, then tally it in a weekly log. The end result will be a page that totals how many emails I sent each week for the year based on the number of clicks I have made to the spreadsheet.
Ideally I would also like to log the number of times the phone number is clicked too, but I am unsure how to make the phone number a live cell.
View 3 Replies
View Related
Aug 18, 2009
I attached an excel that I created. But I have one problem with it.
View 4 Replies
View Related
Mar 18, 2014
I want to click on a cell and automatically hide the 3 rows underneath where I clicked. Then unhide them when clicked again.
I will assign the vba code to the specific cells of the sheet where I need it. But it will always hide/unhide the 3 rows underneath the click.
View 2 Replies
View Related
Apr 20, 2013
I have a spreadsheet with near 300 tabs, each with a picture in the tab. The main tab has a list of all other tabs, the goal is to allow the user to click on a cell next to an entry, and have Excel flash the referenced tab to allow the user to see what the entry is referencing. I have written a simple macro that activates a desired tab, unhides it, displays a message box to pause the macro, rehides the tab, then returns the user to the main tab.
Rather than creating a macro for all 300 tabs and creating buttons I would love to use the Private Sub Worksheet_SelectionChange(ByBal Target As Range) or some variation thereof, to make my life much easier. The name of the tab is in cell A2, so I would want to have the user click on cell A1, activate the macro, then take A1 to A2 with something like A1 = A(x+1)->A2, then display the tab listed in A2. So rather than have 300 macros with Sheets("XYZ").Visible = True, I would love it to read Sheets(contents of referenced cell).Visible = True. with the contents of referenced cell coming from some manipulation of the cell I clicked on...
View 4 Replies
View Related
Jun 4, 2014
I have a workbook with two sheets, Project Overview and Projects Detailed. In Project Overview column K is different project numbers and what i need the code to do is when this number is pressed it has to go to Projects Detailed and search for this number in column AV and hide the lines that does not correspond with the number that has been double clicked.
In project overview you should only be able to press the numbers from row 9 and down and in Projects Detailed the numbers in column AV also starts in row 9. Some of the cells in column AV are empty and these should also be hidden.
View 2 Replies
View Related
May 30, 2014
code that will be able to lookup a cell in Column J of Sheet1 by using a lookup value on Sheet2. The lookup value can be any cell in columns B, D, F, H, J, K, or N on Sheet2. The tricky part is, I want the result of this lookup (the result comes from Column H of Sheet1) to be placed as a data validation input message for the cell directly to the right of the lookup value when this cell is clicked.
For Example: Lookup Value is "416991" which lies in cell N8 on Sheet2. Look it up in Column J of Sheet1 and return the appropriate value "X" from Column H of Sheet1. "X" will then appear as an input message when cell O8 of Sheet2 is clicked.
View 1 Replies
View Related
Jan 21, 2009
Is there any way that I can get the name of the shape i just clicked to call a procedure?
I have 35 shapes in my Worksheet.
Each shape has a different name. Each shape has a macro procedure assigned, wich do almost the same procedure (with just small differences, depending on from wich shape the macro was called).
I want to make just one macro procedure and catch from wich shape the macro was called.
View 4 Replies
View Related
May 2, 2014
I have this module code in VB:
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Application.ScreenUpdating = True
End Sub
Conditional formatting rule applied to range.
=CELL("row")=ROW()
This highlight's the row yellow when a cell in that row is clicked, however it only highlights the row when you refresh the page by scrolling off the cell and back again. It just feels a bit flaky.
View 3 Replies
View Related
Jun 17, 2014
I was wondering if there is a function to be able to track when the last time a hyperlink was clicked and display the date in a new cell?
View 1 Replies
View Related
May 14, 2014
I have a userform1 with textbox1, checkbox1, checkbox2, checkbox3 and checkbox4. What i want to accomplish is
[Code]....
View 3 Replies
View Related
Nov 20, 2008
I have a user form where a user chooses a file. The form works fine, but if the user clicks the (x) in the top right of the box I get an error. how to either remove the (x) or what value is returned when the (x) is clicked so that I can put some handeling for it in my script.
View 5 Replies
View Related
Feb 10, 2010
How do I capture which hyperlink has been clicked (selected in any fashion)?
Then get associated shape name.
View 11 Replies
View Related
Apr 13, 2007
I've been making a spreadsheet with lots of optionbuttons, and I'm slowly starting to understand how to link them to values, execute VBA script when their value changes, etc.
There is a problem that completely puzzles me. When I click the button (not in Design Mode), or any of the other buttons in the same group, they keep on growing! Please see the attached picture for an idea of what it looks like after a few clicks. I want the text and button size to be stable. I haven't changed the zoom, column sizes, etc. so I can't be that. They grow by simply clicking buttons in the same group.
View 9 Replies
View Related
Jul 22, 2006
I've been working on a visualizer for large data sets and I'm trying to create a flexible interface. What I am trying to do is populate a sheet with objects(rectangles, triangles, etc.) and linking them all to the same macro. The macro would detect what had clicked it and read the alternative text which would hold the command procedure for that object. I've seen how people detect cursor position but I have not come across anything to detect the object that was clicked. The code I've found (in another post) is as follows:
Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Type POINTAPI
x As Long
y As Long
End Type
Sub CurosrXY_Pixels()
Dim lngStatus As Long
Dim typWhere As POINTAPI
lngStatus = GetCursorPos(typWhere)
MsgBox "x: " & typWhere.x & Chr(13) & "y: " & typWhere.y, vbInformation, "Pixels"
End Sub
This works but I can't figure out how to detect the object it clicked. I was hoping to use
ClickedObject = ActiveWindow.rangefrompoint(typeWhere.x, typeWhere.y)
Command = ClickedObject.AlternativeText
but all I get is errors.
View 2 Replies
View Related
Aug 7, 2006
I have a spreadsheet with a variable number of xlButtonControl type form controls. The actual number of buttons depends on the amount of data that the spreadsheet is being asked to summarise. All the button controls use the ".OnAction" property to point execution on click to a common procedure.
Unfortunately that much is what it is and is beyond my control, so I just have to work with that.
What I would like to know is if there is a property or method I can access from within the common OnAction procedure that enable me to identify which button was pressed. If this was a CommandBar environment I would use the ActionControl property. Since it's not, and since I can't change it (not even to use ActiveX controls!), does anyone know an equivalent that I can use in this case?
View 4 Replies
View Related
Oct 4, 2011
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?
View 1 Replies
View Related
Sep 11, 2012
Am I able to call a macro when someone clicks "file" and then "print"? I have a macro ready to go, but I am unable to right click and assign a macro to the print button.
View 3 Replies
View Related