Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Get address of cell clicked
I want to write a macro that documents the address of the
cell that is clicked, NOT the active cell. Example: With A5 active, you invoke the macro. The macro asks "What cell do you want to document?" The user then clicks, say, A1. The macro then enters this in A5: =cell("address",a1)&cell ("filename",a1) Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Get address of cell clicked
Terry,
Look at Application.InputBox (with a Type of 8) in Help. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Terry" wrote in message ... I want to write a macro that documents the address of the cell that is clicked, NOT the active cell. Example: With A5 active, you invoke the macro. The macro asks "What cell do you want to document?" The user then clicks, say, A1. The macro then enters this in A5: =cell("address",a1)&cell ("filename",a1) Thanks! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Get address of cell clicked
Sub AA()
Dim MyRange As Object Set MyRange = Application.InputBox(prompt:= _ "What cell do you want to document?", Title:="Select Cell", Type:=8) ActiveCell.Value = MyRange.Address End Sub This will put in your active cell (A5 in your example) the string "$A$1". I suppose if you want it in the way you described, you can try this: Sub AAA() Dim MyCell As String Dim MyRange As Object Set MyRange = Application.InputBox(prompt:= _ "What cell do you want to document?", Title:="Select Cell", Type:=8) MyCell = MyRange.Address ActiveCell.Value = "=Cell(""address""," _ & MyCell & ") & Cell(""filename"", " & MyCell & ")" End Sub Regards, John "Terry" wrote in message ... I want to write a macro that documents the address of the cell that is clicked, NOT the active cell. Example: With A5 active, you invoke the macro. The macro asks "What cell do you want to document?" The user then clicks, say, A1. The macro then enters this in A5: =cell("address",a1)&cell ("filename",a1) Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Change the chart when a cell is clicked | Charts and Charting in Excel | |||
cell is not outlined when clicked on | Excel Discussion (Misc queries) | |||
Drop down fill box does not appear when cell clicked. | Excel Worksheet Functions | |||
How do I insert a cell which changes value when clicked on | Excel Discussion (Misc queries) | |||
HOW DO I GET AN X IN A CELL IN EXCEL TO COME & GO WHEN CLICKED | Excel Discussion (Misc queries) |