Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-26-2024, 03:23 AM
Shelley Lou Shelley Lou is offline VBA Run Time Error 91 Windows 10 VBA Run Time Error 91 Office 2016
Expert
VBA Run Time Error 91
 
Join Date: Dec 2020
Posts: 259
Shelley Lou is on a distinguished road
Default VBA Run Time Error 91

Hi Vivka, the code should only run on text that is selected i.e. text selected directly after the table at clause 1.1 and before schedule 1, hopefully the way the code is written it should only work on selected text and nothing else in the document (the test document is how our leases are set up with tables and just for info purposes).



The idea was I was hoping the code only worked on selected text, if I copy and paste the text into a blank document (i.e. with no tables etc.) it does work, so I've gone back to that way to use the code and then once updated I copy it back into the lease document. Bit long winded but its how it will only work at the moment.

Unfortunately when running your new code it ended up in an endless loop and I had to shut Word down.

Thanks so much for all the help though, I really do appreciate it.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why am I getting this run time error? MaxPower Excel 2 12-31-2023 01:31 AM
Word template with Macro keeps getting an error ''Run-time error 5941'' Marcel Word VBA 3 12-17-2019 04:55 PM
Word Error Message Run time Error 4605 baes10 Word VBA 1 08-30-2018 02:37 PM
Get Run-time Error 11 Jamtart PowerPoint 2 08-31-2012 05:04 AM
Word Visual Basic error - run time error 504 crazymorton Word 11 01-13-2012 04:32 AM

Other Forums: Access Forums

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