A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Tables
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Selecting non-contiguous rows/columns - problems in macros



 
 
Thread Tools Display Modes
  #1  
Old August 19th, 2004, 01:10 PM
Michael Skovfoged
external usenet poster
 
Posts: n/a
Default Selecting non-contiguous rows/columns - problems in macros

Hi,

When I select non-contiguous cells/columns/rows in Word 2002/2003, I
am having trouble with my macro. It seems as if only the last
selection made is available in the Selection object. If I select one
row from two different tables, then "Debug.Print
Selection.Tables.Count" tells me there is one table selected. I would
like to detect if there are non-contiguous rows/columns selected, is
it possible?. If possible I would like to remove the possibility of
making such selections. Any ideas?

Regards,

Michael Skovfoged
  #3  
Old August 20th, 2004, 11:41 AM
Michael Skovfoged
external usenet poster
 
Posts: n/a
Default

Thanks for your help.

I am going to use Selection.ShrinkDiscontiguousSelection which seems
to be all there is. It works as expected, unless you have selected two
columns in a table. In this case ShrinkDiscontiguousSelection will
select the entire table!!.

Regards,
Michael



Jay Freedman wrote in message . ..
Hi Michael,

The VBA support for discontiguous selections is extremely poor. A
description and the few pitiful workarounds are given at
http://support.microsoft.com/?kbid=288424.

--
Regards,
Jay Freedman http://aspnet2.com/mvp.ashx?JayFreedman
Microsoft Word MVP FAQ: http://word.mvps.org

(Michael Skovfoged) wrote:

Hi,

When I select non-contiguous cells/columns/rows in Word 2002/2003, I
am having trouble with my macro. It seems as if only the last
selection made is available in the Selection object. If I select one
row from two different tables, then "Debug.Print
Selection.Tables.Count" tells me there is one table selected. I would
like to detect if there are non-contiguous rows/columns selected, is
it possible?. If possible I would like to remove the possibility of
making such selections. Any ideas?

Regards,

Michael Skovfoged

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using macros on custom toolbars in templates. Conan Kelly Worksheet Functions 2 August 2nd, 2004 02:28 PM
Problems with columns, macros and auto filter Johan Swanepoel Worksheet Functions 2 May 3rd, 2004 03:48 PM
Selecting non-consecutive rows/columns Louise Worksheet Functions 1 April 19th, 2004 11:54 AM
Excel sees macros which are not there. Terry Setting up and Configuration 5 April 7th, 2004 02:14 AM
How to avoid the file that conatain macros Nikos Yannacopoulos Worksheet Functions 0 March 22nd, 2004 02:11 PM


All times are GMT +1. The time now is 07:34 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.