Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-10-2025, 09:13 PM
macropod's Avatar
macropod macropod is offline Looking for Speed Enhancement for Large For ... Loop Windows 10 Looking for Speed Enhancement for Large For ... Loop Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,523
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

A couple of pointers:
1. Your code to clear an existing grid could be reduced to:
Code:
If oFrm.chkClear Then ActiveDocument.Range.Delete
2. Instead of repeatedly creating and formatting oLine for each iteration of the loop, create three side-by-side textboxes, each one 1/3 of the page width and insert a table into each textbox with 1/3 of the columns (a Word table can span up to 63 columns and the most you'll need is 134) and however many rows you need, spacing the rows and columns as required. Strictly speaking, you only need two tables for 1/8" and three for 1/16" - all the rest could be done with one table. Even a 1/12" (6pt) grid would only require two tables.

An alternative approach would be to create a 1/4-page size textbox and insert 1/4 of the grid into that, then replicate three copies of the textbox, positioned appropriately on the page.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Speed pains RRB Word 5 03-24-2024 07:23 AM
speed woes RRB Word 8 03-08-2023 04:01 PM
Looking for Speed Enhancement for Large For ... Loop how to speed up macro AC PORTA VIA Excel 3 10-30-2015 08:58 PM
Looking for Speed Enhancement for Large For ... Loop Large Word doc duplicating large sections when I print it. Kea Word 3 05-30-2015 02:28 PM
Looking for Speed Enhancement for Large For ... Loop Enhancement to the “Microsoft Forum”! Jamal NUMAN Word 4 01-30-2012 10:14 AM

Other Forums: Access Forums

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