Get The Name Of The Shape Clicked
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
ADVERTISEMENT
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
Nov 19, 2008
I have map shape in my excel sheet. each country is a shapes on its own. If i Select one of the country i want to display a pop up Box. For examle if i select Americas I need it to display another box with some data and when i deselect it it should hide the box. Tried some code over here but does not work.
Sub HideShowRectangle()
With ActiveSheet.Shapes("Data1")
If ActiveSheet.Shapes("Americas").Select = "True" Then
.Visible = True
Else
.Visible = False
End If
End With
End Sub
View 5 Replies
View Related
Mar 4, 2009
when i run the below code i get an error 438 'object doesnt support this property or method'
View 2 Replies
View Related
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
View Related
Jan 24, 2014
On the attached spreadsheet there is two irregular shapes. "Area1" & "Area2". I need to be able to determine which area the "ball" shape is located in. If the ball is in Area1 then "Multiply 8" gets the ball and "Multiply 9" moves to the blue cell "AH39". If the ball is in "AreaB" Multiply 9 gets the ball and "Multiply 8" runs to cell "S37"
I should be able to do the moving of the shapes using all the samples, its determining which area the ball is in is the problem.
In the real spreadsheet i will probably have around 10 different Areas.
Move Two Objects - Select Case.xlsm
View 5 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 23, 2009
I have D4=0.42. I thought this formula =IF(D4<0.38,"Thin",IF(0.38<D4<=0.48,"Good shape","Bad shape")) was supposed to give me "Thin" for D4<0.38, "Good shape" for 0.38<D4<=0.48 and "Bad shape" for the contrary, but it only gives me "Bad shape" when D4 is clearly between 0.38 and 0.48.
View 4 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
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
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
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
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
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
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
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
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
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
Mar 19, 2013
Is there a way in VBA to reference the activeX button which has been clicked? Like a ThisWorkbook equivalent for a button?
I have quite a few button whereby they set a parameter for a procedure 'TrendData' based on the row they sit in. Currently I just have the row number hard coded i.e. Call TrendData(5) but I want to amend this so that when I add a row it doesn't offset all my buttons.
For Example
Call TrendData(CommandButton3.TopLeftCell.Row)
However instead of typing CommandButton3, CommandButton4, etc. I would like the code to know which button had been clicked and just use that?
View 9 Replies
View Related
Jul 2, 2014
I have a multiple select listbox on sheet1 and I have changed the colour to match the rest of the report. The problem is that when the listbox is clicked the selection is highlighted but I have set the Liststyle to 1 so there is a checkbox which shows that the item has been clicked.
Is there a way to remove the highlight leaving only the ticked box?
View 1 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
Jan 30, 2009
I need a code for "click-able button" in my excel sheet that will call makro "copy" which I have connected with ThisWorkBook /Sub copy() .../ or in other case with Modules (module 7 for example).
So, what to add between this:
Private Sub CommandButton1_Click()
?
End Sub
View 9 Replies
View Related
May 3, 2005
Sub Mainscoresheet()
Dim k As Integer, i As Integer, cs As Integer
Set b = ActiveSheet.Buttons(Application.Caller)
With b.TopLeftCell
cs = .Column
End With
I have a button assigned to this macro about 20 times all over my worksheet
I will place the button in dirrerent locations. What I need to do is get the column that the top-left corner of the button and assign that to "cs".
Example if the top left corner of the button is in column "F" then cs would be 6.
View 9 Replies
View Related
May 2, 2006
1) I cannot figure out how to write VBA so the "Show Results" button will open the hidden worksheet when clicked.
2) When I use the userform to add new info, it does save to the worksheet, but when I cose the userform and try to open the spreadsheet, I get the following message, "Userform is already opened. Reopening will cause any changes to be disguarded". If I answer yes, I lose my changes, if I answer no, the changes are saved. I want this message to go away and data from the userform to automatically be added to the spreadsheet.
3) I want to make sure the "Account Number" field has a 9 digit number in it before it can be saved. If there is not a 9 digit number I would like an error message saying "Please enter a 9 digit account number" as a pop up.
4) I want to make sure both the "Account Number" and the "Assignment" fields have been populated before the data can be saved.
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
May 31, 2006
i have been having this problem with my version of excel at work and it is driving me crazy. First of all this is excel 2000. For a while now I have been unable to use the control toolbox - when I click it - nothing happens. In the meantime I havent been doing anthing really serious so I used the forms toolbar. I have tried using the control toolbox in word - and it works - just in case someone had been messing around and uninstalling things. Is there anyway that I have hidden it somewhere?
View 6 Replies
View Related