Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,173
Default copy any clicked cell address like A1 or B4 to the clipboard

You can copy the value to the clipboard by taking the same course and then
copying the cell, so

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Worksheets("Hidden Sheet").Range("A1").Value = Target.Address
Worksheets("Hidden Sheet").Range("A1").Copy
'It's now on the clipboard
End Sub

You may do better to put this over to a standard sub so you can run it from
a button or similar, the SelectionChange() event may now be overkill

Sub CopyAddressToClipBoard()
Worksheets("Hidden Sheet").Range("A1").Value = Selection.Address
Worksheets("Hidden Sheet").Range("A1").Copy
'It's now on the clipboard
End Sub

What you do after this is beyond me as I don't know the application you are
looking to paste it into.

If you can't automate the application at all then you may be able to
automate the last step, but that's over to you

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


"up2you" wrote in
message ...

Hi Nick,
Thanks for your help but,
i can not use this for my application. for example,
there is a value in cell B4,
what i want is when i click this cell,
copy this cell's address B4 to the clipboard,
then i will open other application (unigraphics CAD program)
to assign or paste this B4 address to the place in UG window.

So i need to copy B4 address to the clipboard to use later for other
application for pasting..

Do you have any idea for the code?


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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to copy the value of cell into clipboard by double click [email protected] Excel Worksheet Functions 2 March 22nd 07 01:33 PM
Change cell value when right-clicked/double-clicked grime[_5_] Excel Programming 5 October 17th 05 01:52 PM
how to copy on double-click the cell value to Clipboard cyrille Excel Worksheet Functions 2 February 15th 05 05:56 PM
how to copy on double-click the cell value to Clipboard cyrille New Users to Excel 2 February 11th 05 11:29 PM
Get address of cell clicked Terry Excel Programming 5 January 8th 04 07:16 PM


All times are GMT +1. The time now is 03:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"