Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-26-2021, 11:40 PM
LittleScribbler LittleScribbler is offline macro problems Windows 10 macro problems Office 2013
Novice
macro problems
 
Join Date: Mar 2021
Posts: 7
LittleScribbler is on a distinguished road
Default

Hi


Thank you everyone who has helped me with this macro problem.

I haven't learnt batch files yet, but would love to Graham

The rewritten macros from macropod, Paul Edstein and Guessed worked. Thank you so much. I'm delighted.

For macropod and Paul Edstein, I didn't know what smart quotes were, but think I might now after reading all the feedbacks again. I still don't know what poor structure, stucture code or code tags are. I can see the hash mark at the top now and never knew what it was for, but I'll press it before I sent this message and hope the message still gets through.

For guessed, is there a limit to the amount of words I can use in a macro?

LittleScribbler
Reply With Quote
  #2  
Old 03-27-2021, 06:21 AM
macropod's Avatar
macropod macropod is offline macro problems Windows 10 macro problems Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,518
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
Reply



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 09:39 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