Free Microsoft Excel 2013 Quick Reference

Click Cell Event

Hi Guys,

I can't get my head around this one.

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.

Has anyone got any ideas?

Many thanks


Okay this is a complicated excel question (i think)

So I have a bunch of data appearing on a page called "Data" that
contains data on different Companies in a certain market place. It has
data like market size, earnings, growth, etc.

So anyway, this data is listed vertically (that is to say, the company
names appear across the top row and the fields (such as market size,
earnings, growth) appear down each column)

The very top row on "Data" contains the Company's ticker (stock
symbol). Now what I would like to do is be able to click a ticker on
that page (maybe through a hyperlink?) and have that ticker appear in
cell "A1" of a sheet called "Home". Does that make sense? Basically
suppose I clicked on cell F1 on the "Data" page, which contained the
ticker IBM. I want the ticker "IBM" to then appear in Cell "A1" of a
sheet called "Home." Now I could go back to the "Data" page and click
cell F2 (which contains the ticker MSFT, for example) and then cell
"A1" in sheet called "Data" would change its value to "MSFT".

Is this possible to have an entire row (Call it row 1) in one sheet
(call it Sheet A) linked to cell A1 of another sheet (call it Sheet B),
whereby clicking on any cell in (Row 1) of (Sheet A) will make the value
of cell A1 in Sheet B become the value you clicked on?

I probably overexplained this, but I dont know how to easily explain
this situation.

I know i could use drop down boxes where you choose the Company name
from and then use offset and match, but id like to make it clickable
just because the drop down would be so large

--
nshah
------------------------------------------------------------------------
nshah's Profile: http://www.excelforum.com/member.php...nfo&userid=875
View this thread: http://www.excelforum.com/showthread...hreadid=400613

Excel 2000

I have an Excel sheet with 46 checkboxes that are grouped into 10
categories. With each category there is a command button that can be used
to check all the checkboxes in the category, or to clear them all.
Basically, it all works, but I have noticed one small problem that I would
like to solve just as a learning exercise (it's not really something that
must be fixed).

Say that 5 out of 6 checkboxes in a category are checked, and that the
command button for the category reads "Check All". If the last checkbox is
checked manually, all the boxes in the category will be checked, but the
command button will still read "Check All" when it should read "Clear All".
This condition can easily be fixed by clicking the command button, which
will check all the boxes and change the caption of the button to "Clear
All".

Conceptually, I can see how this small problem could be fixed, but I don't
know enough about Excel VBA to know if my idea is feasible, and I don't know
the commands to get there. However, I've recently been working a lot with
Word VBA, so hopefully there will be some VBA similarities between the two
applications.

I'm not too keen on the idea of adding 46 routines (one for each checkbox)
to my code, so my idea is to create a user-defined event that will run every
time a checkbox is clicked. For lack of a better term, let's call this the
"click checkbox event". When any checkbox in the sheet is clicked, the
click checkbox event would run through all the checkboxes in the active
sheet and find all the other checkboxes that are in the same category as the
checkbox that was clicked (I have them all named in such a way that would
make that possible). As it found other checkboxes that are in the same
category, it would look at how each is set. At the end of the process, if
all the checkboxes in the category are set the same way, the caption of the
command button for that category would be set accordingly.

So my questions a

1) Is it even possible to create a user-defined event that will fire every
time a checkbox--any checkbox--in the sheet is clicked?

2) Assuming that question 1 is possible, how would I make the event check
all the other checkboxes in the sheet? Is there a collection that would
contain all the controls in the sheet?

-- Tom

State of Montana
Department of Justice Help Desk

"Making the world a safer place."

Okay this is a complicated excel question (i think)

So I have a bunch of data appearing on a page called "Data" that contains data on different Companies in a certain market place. It has data like market size, earnings, growth, etc.

So anyway, this data is listed vertically (that is to say, the company names appear across the top row and the fields (such as market size, earnings, growth) appear down each column)

The very top row on "Data" contains the Company's ticker (stock symbol). Now what I would like to do is be able to click a ticker on that page (maybe through a hyperlink?) and have that ticker appear in cell "A1" of a sheet called "Home". Does that make sense? Basically suppose I clicked on cell F1 on the "Data" page, which contained the ticker IBM. I want the ticker "IBM" to then appear in Cell "A1" of a sheet called "Home." Now I could go back to the "Data" page and click cell F2 (which contains the ticker MSFT, for example) and then cell "A1" in sheet called "Data" would change its value to "MSFT".

Is this possible to have an entire row (Call it row 1) in one sheet (call it Sheet A) linked to cell A1 of another sheet (call it Sheet B), whereby clicking on any cell in (Row 1) of (Sheet A) will make the value of cell A1 in Sheet B become the value you clicked on?

I probably overexplained this, but I dont know how to easily explain this situation.

I know i could use drop down boxes where you choose the Company name from and then use offset and match, but id like to make it clickable just because the drop down would be so large

Please help,

Book1. Sheet a,b,c,d

Book2
Sheet1(list names of sheets in workbook Book1)
coulum A
a
b
c
d

I need code
Book2.sheet1 = list all worksheets form Book1
Click cell A1 to goto sheet a (Book1)
Click cell A2 to goto sheet b ......

Thanks ..

I have a range of cells on Sheet 1 (lets say, range C10:Z500). For each cell
in this range, I want to program it so that when a user double-clicks a cell,
it takes them to the same cell reference on Sheet 2. (i.e. if I click cell
G45 on the first sheet, it takes me to cell G45 on the second sheet). Can
anyone help me with the proper code for this action?

How do you set up a cell to respond to a double click event?

TIA,

Far Farley

1. I would like to trigger an event once i click on a cell, for example I click one click on a cell (1,1) and it run some macro.

2. When I bring my cursor to this cell , to change cursor pointer to pointer like in hyperlink.

Thanks

I have the following code as part of worksheet event change. If any cell on range("n21:N137") is clicked, I want range("a1") = clicked cell text. Based on this , couple of other cells also change. But when I execute the following code, getting the error message:
"The instruction has referred memeory....could not be read. Click OK to teriminate the program" and excel shuts down. Is anything wrong in the code?
Appreciate your help.

	VB:
	
 Range) 
    If Intersect(Target, Range("n21:n137")) Is Nothing Then Exit Sub 
    Application.EnableEvents = False 
    Range("a1") = Target.Offset(0, 0) 
    Application.EnableEvents = True 
End Sub 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines


I would like for a vba programmer to tell me if the following program can be written before I attempt to code it. When I open Excel I want to see cells containing names in a square array with red backgrounds. As I click on each cell I want the cell to turn green and I want an alphabetized column of the names to have a 1 recorded(after I click) indicating that the person is present. If a person's name is red then I need a 0 recorded. If possible, I would like to be able move over one column each day that I take attendance by clicking on a cell in a row above the column of names. I am a math professor and I write computer code most every day but I have only written some small routines in vba that did not involve events.

I have a textbox from the drawing toolbar. When someone changes a cell then clicks in the textbox, Worksheet_Change does not run. If they double click in the cell, that's OK I can capture that event and protect the sheet, stopping them clicking in it. But if they just start typing in the cell, I can't capture that. I have seen some API code which captures keypresses, but it is not practical to use as it loops repeatedly. I could lock the textbox and have the user do something to unlock it, but this is a last resort.

Hi all!
I have a sheet with some cells that are linked and some
not. Changes will occur in the master workbook that may
require some of the unlinked cells to be changed to
linked. I'd like to know if it is possible to catch the
event triggered when a user clicks the "OK" to update
linked cells so I can run a procedure to check if other
cells need to be updated. Can anybody help me catch this
event? Any ideas or suggestions would be greatly
appreciated.

TIA,
Joe
(please respond directly to the group)

Can code detect a click or d-click in a cell in Excel and act on that somehow, without the normal edit-cell event?

Thanks - Kirk

Hi everybody,

I am programming in C++. After the user clicked on an excel cell I need to idenify it. I get the event "SheetSelectionChange" and I tried the following code:
XL::Range range;
LPDISPATCH lpActiveCell;
lpActiveCell=appExcel.GetActiveCell();
range.AttachDispatch(lpActiveCell);

How can I get the coodrinates (e.g. D12) from the range?

Thanks,
Vaclav

I am looking to take a data set that has the range A1 (A1 through W1 contains the headers) through W87 and do the following.
1. Sheet1. click any cell in Column 1 (contains all customer names) and automatically invoke a copy of that row of data
2. Sheet2. take that row of data and transpose it into a new worksheet(sheet2)
3. Format the new worksheet so that cells Ax through Cx (from sheet1) are now headers in sheet2 and the rest of the data in that row from Dx through Wx are centered in sheet2 in 2 columns.

If someone could help me with this I would greatly appreciate this..

I have attached an example of what I would like it to look like

Thanks in advance,

i have a list of names on a sheet, there is another sheet where i want the names in a cell only when it has been clicked. Then thing about it i dont want to click the name i want to click another cell that is in the same row as the name. I've tried everything and this is my last resort. help!

I have a question regarding events/triggers. i want a specific cell, say cell [m2] to trigger a userform. problem is that the help file is not installed on my computer and i am not the system admin., i cant even find the system admin to install it . anyhow, i dont know how to make cell [m2] into a trigger. the rest of code is written and working beautifully. does anyone have a code snippet or maybe a push in the right direction?

Hi,

I was trying to record a code wherein a cell will be double-click.
But no code was appearing, and don't know if there is such a code that will double-click a cell like:

	VB:
	
Range("A1").Select 
 'Code to Double-Click Cell A1

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines
There is no definite command, just to double-click CellA1.
Thanks in adavnce!

-Marvs

hello,

I want to display a comment/note that is always visible however:

*The text in the comment should change "only when" the user of my worksheet "clicks" on a specific cell in the worksheet;
*I do not want that a comment appears/disappears/changes when the mouse moves over any of the cells
*I do want that the same comment/note is used to display different text when the user clicks on another cell in the worksheet
*I do want that the user can position this comment on his screen where he wants it to be.

thanks,

Is there a way to enable a macro by double-clicking a cell?

Currently, I'm running an AutoFilter macro that automatically references a second sheet when the specific cell is selected. The problem is that when a user does a search for an item (Ctrl+F), the macro will immediately initiate and refer to the other cell which confuses the user.

Ideally, I want the macro to be initiated ONLY when the user DOUBLE-CLICKS on the cell.

Here's the code that I'm using:


	VB:
	
 Range) 
    If Target.Column = 1 And Target.Row

Hi There

I just had a weird problem I couldn't solve for a friend so I though I would throw it out there to you all. I've been using excel for years and never seen this before.

An excel file is generated by some proprietry Oracle software and appears to be a normal Excel file. However, if you attempt to change the cell format from text to number, or enter a simple formula the cell value/appearence will not change unless you double click the cell to activate the cursor within it, and then hit enter????

The file contains a lot of data so doing this cell by cell is not feasible. I was able to copy all and paste special --> values into a new workbook (so I sorta solved the problem), but I must admit I was astonished I could not use Excel to work with the source file properly.

If anyone has any advice it would be greatly appreciated

Thanks and regards

Larry

I am trying to select a range of cells after a userform unloads. the userform is fired by a double click event. I want to select a range of cells (on the same line of the double click cell), but seem to be having a problem with the selection. the double click is fired in cell "A1"

	VB:
	
 cmdCancel2_Click() 
    UserForm2.Hide 
    Unload UserForm2 
    Range("D" & Target.Row &":AH" & Target.Row).Select 
End Sub 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines
This is the code for just one of the buttons on the userform.

Hi,
Could somebody tell me how you can call a text input box by double clicking a cell.

Thanks

I want to set up a column so that by clicking a cell once it changes value AND color.

For eg a clicked cell changes to green with a value of 1 point, click again it changes orange with a value of 2 points, click again it changes to red with value of 3 point, then finally click again goes back to no fill with nil value.

Can I do this and if so could somebady please tell me how?

This would very very useful for marking my candidates results and categorising them by their level of understanding of a question.

I have spreadsheet with client names. I'd like to build logic that will open a form with client information when a user double-clicks on the client name.

But I have a couple of problems.
- First, I'd like to protect the sheet and hide the formulas. But when I protect the sheet, I get the "the cell or chart you are trying to change is protected" error when I double click the protected cell.

- If I deselect the "Select Locked Cells" options when I protect the sheet, I no longer have the ability to double-click on the cell.

Does anyone have a suggestion on how I can double click on a cell yet not allow the user to edit the cell (or see the formula)?