View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nick Hodge Nick Hodge is offline
external usenet poster
 
Posts: 1,173
Default copy any clicked cell address like A1 or B4 to the clipboard

You don't need the clipboard, you can either assign the address to the cell
or object you want, or store it in a range name/hidden worksheet or public
variable if you can use it in scope. My code uses the
worksheet_SelectionChange() Event which can be copied to the worksheet code
class (Right click on a sheet tab and select view code...). It copies the
address of the selected cell(s) to A1 on a sheet called Hidden Sheet.
Hopefully this will give you some ideas

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Worksheets("Hidden Sheet").Range("A1").Value = Target.Address
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
HIS


"up2you" wrote in
message ...

Hi friends,
when i select any cell (by clicking),
_*the_address_of_this_cell_*_(like B5) is going to be copied to the
clipboard *(not the value of cell).*

I am going to use this address for the other applications who works
with excel.

Any suggestions what is the code?

Thanks for your time....


--
up2you
------------------------------------------------------------------------
up2you's Profile:
http://www.excelforum.com/member.php...o&userid=33468
View this thread: http://www.excelforum.com/showthread...hreadid=533502