Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 06-02-2021, 06:14 AM
JamesWood JamesWood is offline Counting numbers in Word VBA Windows 10 Counting numbers in Word VBA Office 2019
Advanced Beginner
Counting numbers in Word VBA
 
Join Date: Nov 2020
Posts: 37
JamesWood is on a distinguished road
Talking

I've managed to figure it out guys!!

So just before the merge starts, I've got this:


Dim n As Integer
n = 1



Then the merge loop starts:

For recordNumber = MergeStart To MergeFinish



And then just before "Next recordNumber", I now have


'Progress bar based on how many records in merge
If Me.OptionButtonAll.Value = True Or Me.OptionButtonCurrent.Value = True Or Me.OptionButtonFromTo.Value = True Then
Me.ProgressBar1.Value = Round(100 / MergeCountTotal * n)
Me.ProgressPercentage.Caption = Me.ProgressBar1.Value & "%"
End If
n = n + 1


This way it adds +1 to n just before it loops again. It's working perfectly now for calculating the correct percentage based on how many merge records it's processing. Thank f**k. This was driving me wild!


Thanks for your help though guys!
Reply With Quote
 

Tags
count, counta



Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting footnotes in Word Sylvain Word VBA 0 03-10-2021 06:45 AM
Counting Consecutive Periods In Rows Using Numbers Yaaseen23 Excel 18 03-24-2017 11:15 AM
counting "x" in a cell and sum the numbers in weekday rayramirezdvm Excel 4 04-02-2015 02:58 PM
Counting unique visitors by ward, counting monthly visits by status, editing existing workbook JaxV Excel 9 11-14-2014 12:25 AM
Word counting macro for newly added portion? New Daddy Word VBA 24 09-30-2013 07:30 PM

Other Forums: Access Forums

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