Computer Forum Forum Index
Register  FAQ Profile Log in to check your private messages Log in Register 

selection of table

 
Post new topic   Reply to topic    Computer Forum Forum Index -> microsoft word vba beginners
View previous topic :: View next topic  
Author Message
elle0612
Guest





PostPosted: Thu Nov 15, 2007 7:50 pm    Post subject: selection of table Reply with quote

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
Back to top
Google
Sponsor





PostPosted: Thu Nov 15, 2007 7:50 pm    Post subject: Advertisement

Back to top
Jay Freedman
Guest





PostPosted: Thu Nov 15, 2007 7:56 pm    Post subject: Re: selection of table Reply with quote

elle0612 wrote:
Quote:
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.
Back to top
elle0612
Guest





PostPosted: Thu Nov 15, 2007 8:11 pm    Post subject: Re: selection of table Reply with quote

Thank you, its just what I needed.

"Jay Freedman" wrote:

Quote:
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.


Back to top
Display posts from previous:   
Post new topic   Reply to topic    Computer Forum Forum Index -> microsoft word vba beginners All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Computer Forum