Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #10  
Old 03-27-2021, 06:21 AM
macropod's Avatar
macropod macropod is online now macro problems Windows 10 macro problems Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,520
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 LittleScribbler View Post
is there a limit to the amount of words I can use in a macro?
There is a limit of 64K characters on the size of a code module. And a given expression can have at most 24 continuations (i.e. line breaks the '_' at the end). My code used only 12, but if for some reason I was running up against the 24 continuation limit, I could simply have made each line longer. Conversely, notwithstanding the 64K code module limit, VBA can also handle strings up to 2GB in length.

Lots of VBA functions have their own limits, though. Hence Find/Replace has a 255-character limit for each expression.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
macro problems Footnote extraction macro [Why is this macro so slow? / anyway to make it faster?] Le_Blanc Word VBA 10 03-22-2021 11:38 AM
Problems with Macro for inserting autotext when autotext name isn't followed by a space amz1950 Word VBA 0 02-14-2018 10:20 AM
Macro problems with Word for Mac 2016 16.9.1 JML Word VBA 2 02-03-2018 01:14 PM
Spell check macro within macro button field doesn't work in one document samuelle Word VBA 0 07-20-2016 02:27 AM
Cutting and Pasting and Macro problems in Excel 2010 enkel Excel Programming 3 01-02-2012 10:15 PM

Other Forums: Access Forums

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