Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Retrieving Cut/Copy Border Address

I am looking for a way to retrieve the address of the cut/copy border
in excel, but have had absolutely no joy browsing the forums and
excel's object model. If I've missed something obvious I apologise,
but any help would be appreciated at this stage.

Kind Regards,

Jose

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Retrieving Cut/Copy Border Address


HelloJose,

To return the address of the cut/copy border, use Selection.Address.

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=487472

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Retrieving Cut/Copy Border Address

Dear Leith,

Selection.Address returns the current selection's address, which may
have changed since the user chose to copy the range. If my macro was
run directly after the user selected the copy range this may work,
however this is almost never going to be the case.

What i am ideally after is the address of the "moving border" copy box
that appears on screen when the user chooses to copy a range.

Regards,

Joseph Mc Daid

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Retrieving Cut/Copy Border Address


Hello Joseph,

After looking deeper into what you want to do, I can say there are no
easy methods to accomplish it. The easiest would be to monitor the
cells being selected using the Worksheet_Change() event. The drawback
being this has to be copied into every worksheet in the workbook that
will be using this. The second and by far the most unattractive and
complex would be to retrieve the cell addresses copied to the
Clipboard. Once the user selects a different cell, the contents to be
cut or copied are transfered to the clipboard, and Excel no longer has
those addresses stored internally. Sorry the news isn't better.

Siincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=487472

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Retrieving Cut/Copy Border Address

Dear Leith,

I am not averse to following the complex route, if there is come means
of accessing the source cell addresses by delving into the clipboard
contents then i shall investigate.

Off the top of my head i wouldn't think that the source address would
be stored in the clipboard, but i have no prior experience, so thats
just conjecture. Can you confirm that the source range is stored in the
clipboard? Any thoughts on API calls that you might know off the top of
your head that could be used to access the clipboard would be
appreciated. I suspect this is headache material so i apologise in
advance :-)

Kind Regards,

Joseph Mc Daid



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Retrieving Cut/Copy Border Address


Hello Joseph,

I will look into the Clipboard API calls more, as my experience with
them is limited. You may be correct about the addresses not be stored.
The API calls only deal with "formats". So the addresses may be a moot
point. I don't think hooking into the Windows messaging system via
Subclassing would be a very viable option to "spy" on the CTRL + C or
CTRL + X keys input. It is an interesting problem. I will let you know
what I find.

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=487472

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 do you copy a border down the page? Tammy Excel Worksheet Functions 0 July 12th 06 06:35 PM
Retrieving all precedents address Michel GLOD Excel Programming 1 February 16th 05 11:20 PM
vba 2003 cut copy animated border Jeff Higgins Excel Programming 4 February 6th 05 11:29 PM
Copy cell without border Sparrowhawk Excel Programming 3 August 22nd 04 05:20 PM
How copy format, font, color and border without copy/paste? Michel[_3_] Excel Programming 1 November 5th 03 04:43 PM


All times are GMT +1. The time now is 04:55 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"