Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-18-2021, 12:19 PM
Cendrinne's Avatar
Cendrinne Cendrinne is offline Help, FNR Wildcards Amounts in tables Cells alone Windows 10 Help, FNR Wildcards Amounts in tables Cells alone Office 2019
Competent Performer
Help, FNR Wildcards Amounts in tables Cells alone
 
Join Date: Aug 2019
Location: Montreal Quebec Canada
Posts: 200
Cendrinne is on a distinguished road
Default Responding to your Stop vs Continue comment....

Quote:
Originally Posted by Guessed View Post
Cendrinne

Edit: I think the wdFindStop could be a problem as the range may collapse as you progress through the code. It is possibly better to use wdFindContinue if you are encountering issues.



Another tip is to not be so liberal with your use of Application.ScreenUpdating = False
It is better to not do that until your code is fully debugged as it stops you from seeing what is going on as your macro runs and makes life difficult if the code fails at any point before you turn it on again.
First paragraph above, I always thought wdFind Stop was to have it START as of the cursor till the end of the document or range. Or else it will start again from the beginning of the document or range. Is that thinking wrong?

Second paragraph above, thank you, never thought of that.

Sorry for my tardy response, I am so busy, and put in so much hours and efforts of my time during the week, that I take a look of my former postings on the later part on the weekend.

Thank you for your insights and Scripts. I can't wait to try them and especially, ......get explanations as to why I should use Continue vs Stop

Cendrinne
Reply With Quote
  #2  
Old 04-18-2021, 04:44 PM
Guessed's Avatar
Guessed Guessed is offline Help, FNR Wildcards Amounts in tables Cells alone Windows 10 Help, FNR Wildcards Amounts in tables Cells alone Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,185
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

Quote:
Originally Posted by Cendrinne View Post
First paragraph above, I always thought wdFind Stop was to have it START as of the cursor till the end of the document or range. Or else it will start again from the beginning of the document or range. Is that thinking wrong?
FindStop does indeed stop at the end of the document. However, if the previous find has moved the range to somewhere down the document, lets assume the middle, then the NEXT find will start from there and only search to the end (hence not checking above the current range position). If any find gets a hit at the end of the file then every subsequent find will have nowhere to search.

Your choices are to reset the range before each find or simply get it to continue so that every search wraps back to the top and is performed on the entire document.

EDITED: Paul is correct, I got this wrong - ignore what I said above. In testing I couldn't reproduce what I was saying so either I've always been wrong or perhaps I've seen this long ago in earlier versions of Word or maybe I was working with the Selection object and single replaces.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #3  
Old 04-18-2021, 07:38 PM
Cendrinne's Avatar
Cendrinne Cendrinne is offline Help, FNR Wildcards Amounts in tables Cells alone Windows 10 Help, FNR Wildcards Amounts in tables Cells alone Office 2019
Competent Performer
Help, FNR Wildcards Amounts in tables Cells alone
 
Join Date: Aug 2019
Location: Montreal Quebec Canada
Posts: 200
Cendrinne is on a distinguished road
Default

Ok I think I understood, so I can continue using Stop vs Continue.
Thanks so much
I love that we can all collaborate and help each other out! Gets our Gray matter working

Millions of thanks and have a super great week

Cendrinne
Reply With Quote
Reply

Tags
cells, helpme, wildcards



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help, FNR Wildcards Amounts in tables Cells alone Splitting Tables containing Merged Cells bpike Word VBA 7 10-28-2020 02:23 AM
Help, FNR Wildcards Amounts in tables Cells alone How do I run code on all cells in all tables? wido Word VBA 2 09-04-2019 05:32 AM
Help, FNR Wildcards Amounts in tables Cells alone Can I repeat or self-populate cells/tables? pvh PowerPoint 6 05-05-2015 03:21 PM
Tables in Powerpoint - Hiding Cells manisfeld PowerPoint 2 06-08-2014 08:17 PM
Shading in Cells in Word Tables Cindy Word Tables 1 01-04-2013 02:38 PM

Other Forums: Access Forums

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