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


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

  #2   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 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default copy any clicked cell address like A1 or B4 to the clipboard


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

  #4   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 12:45 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"