Thread: [Solved] macro problems
View Single Post
 
Old 03-27-2021, 06:21 AM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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