Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-15-2022, 08:39 AM
Thom.Simmo Thom.Simmo is offline Define range within word table between specific text instance and end of cell content Windows 10 Define range within word table between specific text instance and end of cell content Office 2019
Novice
Define range within word table between specific text instance and end of cell content
 
Join Date: Mar 2022
Posts: 5
Thom.Simmo is on a distinguished road
Default

Guessed, thankyou for the section of code, it works perfectly when appended to the original section of code I had put together.



Macropod, thanks again for you help. My apologies if my approach is frustrating. Unfortunately I don't know enough about what I am doing to tackle everything in one go so had resigned myself to adding in functionality in sections as I learn what I am doing.

there is an issue at this line when I run the code
Code:
ThisWorkbook.Worksheets("InspectionPivot").PivotTables("InspectionPivot").TableRange2.Copy
I had set a variable for the excel table but I see you have not done that, could you explain how this is supposed to work?

Thanks
Thom
Reply With Quote
  #2  
Old 03-15-2022, 02:05 PM
macropod's Avatar
macropod macropod is offline Define range within word table between specific text instance and end of cell content Windows 10 Define range within word table between specific text instance and end of cell content Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by Thom.Simmo View Post
there is an issue at this line when I run the code
Code:
ThisWorkbook.Worksheets("InspectionPivot").PivotTables("InspectionPivot").TableRange2.Copy
I had set a variable for the excel table but I see you have not done that, could you explain how this is supposed to work?
I haven't worked with pivot tables before. Regardless, there is no need to have:
Code:
Dim tbl As PivotTable
...
Set tbl = ThisWorkbook.Worksheets("InspectionPivot").PivotTables("InspectionPivot")
...
tbl.TableRange2.Copy
when all you do is define the pivot table then copy it.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Define range within word table between specific text instance and end of cell content How to change the font color of specific text within a Word table cell epid011 Word Tables 2 05-15-2017 05:21 PM
Define range within word table between specific text instance and end of cell content How do I add selection of multi line content control list to specific table cell Dudlee Word VBA 1 09-20-2016 04:58 PM
Define range within word table between specific text instance and end of cell content VBA Table – Search All Tables - Find & Replace Text in Table Cell With Specific Background Color jc491 Word VBA 8 09-30-2015 06:10 AM
Define range within word table between specific text instance and end of cell content Creating a plain text content control for every instance of a word or phrase RobsterCraw Word VBA 16 11-20-2012 03:25 PM
Define range within word table between specific text instance and end of cell content Word VBA: Cannot Edit Range (Delete characters except the first in a table cell) tinfanide Word VBA 3 04-27-2012 09:48 AM

Other Forums: Access Forums

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