Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-25-2021, 02:43 PM
Guessed's Avatar
Guessed Guessed is offline Applying a VBA code only on a selected table Windows 10 Applying a VBA code only on a selected table 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

I would write it so it can do zero to n selected tables without needing to handle errors


Code:
Dim aTbl as Table
For each aTbl in Selection.Range.Tables
  With aTbl.Borders(wdBorderLeft)
    ....
  End With
Next aTbl
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #2  
Old 10-25-2021, 09:28 PM
RobertDany RobertDany is offline Applying a VBA code only on a selected table Windows 7 64bit Applying a VBA code only on a selected table Office 2013
Novice
Applying a VBA code only on a selected table
 
Join Date: Jul 2021
Posts: 22
RobertDany is on a distinguished road
Default

Graham and Andrew
Thanks with my love
Reply With Quote
Reply

Tags
word table, word vba, word vba code



Similar Threads
Thread Thread Starter Forum Replies Last Post
Applying a VBA code only on a selected text or range RobertDany Word VBA 2 10-09-2021 08:31 AM
Run code if selected cell is in column Javi78503 Word VBA 0 09-21-2021 12:31 PM
Applying a VBA code only on a selected table Applying a style to a table row pops out the row mazloum91 Word Tables 2 06-29-2021 07:21 AM
Applying a VBA code only on a selected table run code only when certain cells selected trevorc Excel 2 06-19-2018 02:40 AM
Applying a VBA code only on a selected table After applying a title style, the row in a table doesn't break Salix Word 6 05-05-2016 12:48 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:34 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