Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Thu, 15 Nov 2007 11:50:02 -0800,    group: microsoft.public.word.vba.beginners        back       


selection of table   
Hi

I want to be able to do a particular thing "if a table selection exists".  

If it does not exist I want a little message box to appear saying "select 
the table first".

What is the vba code for this?

Thanks
date: Thu, 15 Nov 2007 11:50:02 -0800   author:   elle0612

Re: selection of table   
elle0612 wrote:
> Hi
>
> I want to be able to do a particular thing "if a table selection
> exists".
>
> If it does not exist I want a little message box to appear saying
> "select the table first".
>
> What is the vba code for this?
>
> Thanks

  If Selection.Information(wdWithInTable) Then
    ' do something
  Else
    MsgBox "Please select a table."
  End If

-- 
Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so 
all may benefit.
date: Thu, 15 Nov 2007 14:56:51 -0500   author:   Jay Freedman

Re: selection of table   
Thank you, its just what I needed.

"Jay Freedman" wrote:

> elle0612 wrote:
> > Hi
> >
> > I want to be able to do a particular thing "if a table selection
> > exists".
> >
> > If it does not exist I want a little message box to appear saying
> > "select the table first".
> >
> > What is the vba code for this?
> >
> > Thanks
> 
>   If Selection.Information(wdWithInTable) Then
>     ' do something
>   Else
>     MsgBox "Please select a table."
>   End If
> 
> -- 
> Regards,
> Jay Freedman
> Microsoft Word MVP        FAQ: http://word.mvps.org
> Email cannot be acknowledged; please post all follow-ups to the newsgroup so 
> all may benefit. 
> 
> 
>
date: Thu, 15 Nov 2007 12:11:01 -0800   author:   elle0612

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us