Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 02-18-2020, 05:31 PM
Guessed's Avatar
Guessed Guessed is offline Word VBA coding for tables Windows 10 Word VBA coding for tables Office 2016
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

Assuming the building block-placed table is IMMEDIATELY above the selection, you could move the selection back into the table by using the .Previous method along the lines of
Code:
  Dim aRng As Range, aTbl As Table, aCell As Cell
  Set aRng = Selection.Range.Paragraphs(1).Previous.Range
  Set aTbl = aRng.Tables(1)
  Set aCell = aTbl.Cell(1, 1)
  aCell.Range.Select
You should be looking to moving away from using the selection object once you have used it to define the initial insertion point.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
2 general question about coding puff Excel Programming 1 12-07-2017 08:53 AM
Word VBA coding for tables Problem Coding End of Page DRD992 Word VBA 1 10-12-2017 05:15 PM
Word VBA coding for tables If else statement-Need help with coding rsrasc Excel Programming 4 10-30-2015 01:10 AM
UserForm VBA coding Niclasfa Word VBA 1 04-08-2015 10:23 PM
What kind of coding? ep2002 Excel 3 07-22-2014 07:52 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:13 AM.


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