View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Get address of cell clicked


"Terry" wrote in message
...
OK, now I've got:

Set MyCell = Application.InputBox(prompt:="Select cell
to document", Type:=8)

But how do I use this variable? If I use:

ActiveCell.Formula = "=cell(""address"",MyCell)"

... my result is #NAME? because "MyCell" isn't a valid
rangename in the worksheet.


Set MyCell = Application.InputBox(prompt:="Select cell to document",
Type:=8)

ActiveCell.Formula = "=cell(""address""," & MyCell.Address & ")"


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)