Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-01-2021, 07:52 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
Question Counting numbers in Word VBA

Hi guys


Strange one here, but any idea how to COUNTA in Word VBA, not Excel? Or the equivalent? I'm aware this sub is totally wrong but hopefully it'll get across what I want to do:


Public Function MergeFromToTotal() As String


MergeFromToTotal = CountA(Range(Me.FromThis.Value:Me.ToThis.Value))


End Function


Where Me.FromThis.Value is a textbox that might contain any number, and the same for the ToThis value. If it was say 3-6 then I'd want MergeFromToTotal to return with 4 (e.g. 3, 4, 5, 6).


Hope that makes sense?


Thanks a lot!
James
Reply With Quote
 

Tags
count, counta

Thread Tools
Display Modes


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 08:45 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