Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-21-2015, 09:07 PM
Guessed's Avatar
Guessed Guessed is offline VBA scripting / table Windows 7 32bit VBA scripting / table Office 2010 32bit
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default


Jennifer

Your code has some unclear bits in it. If you know that the table is always the third one then you simply use that number rather than creating a variable for it.

The following declaration line is probably not giving you what you expect.
Dim vFlag, dummy, xx, yy, zz As Integer

This is a trap for young players but this declares zz as an Integer whilst all the others are of variant type. This matters a lot because the two lines listed in Graham's post assign yy to different things
yy = ActiveDocument.Tables.Count 'this is an integer
yy = ActiveDocument.Tables(1) 'this is a table
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
Reply

Tags
vba tables macro



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA scripting / table Move table cell contents from one table to another table or cell in same table donaldadams1951 Word VBA 4 02-04-2015 03:54 PM
Pivot Table Question- Can the table display in the order the boxes were checked/selected? blackjack Excel 0 09-13-2014 08:57 PM
VBA scripting / table help with scripting mrokoua Outlook 1 08-26-2014 03:52 AM
How to change the path of a table copied by excel in word as linked table RTF? Cristin7 Word VBA 3 03-10-2014 05:25 AM
Scripting error presented when emails are opened from one specific sender Mr Davo Outlook 0 05-30-2012 07:01 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:41 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft