Solved

vba word help

Posted on 2004-10-08
1
140 Views
Last Modified: 2012-03-24
I have alot of code behind a word app.  I was wondering if there is a way to speed up my document so it don't run slow.

would the screenupdate and screenrefresh work for this situation?
0
Comment
Question by:Jason_Kha
1 Comment
 
LVL 3

Accepted Solution

by:
thunder_moose earned 500 total points
Comment Utility
Hi there,

I don't think there's any real way we can help you with this, since we can't see the code to help you optimize it. ScreenUpdate and ScreenRefresh only has to do with when the screen updates or refreshes and wouldn't change the execution speed of your program.

If it's running too slowly, it's probably because you have too many redundant loops or other events that are repeated more than needed. You can also sometimes make logical statements go faster by simplifying them, for example:

If Instr(strName) <> 0 Then

Could just be: If Instr(strName) Then

For some tips on optimizing your code, check out this website:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/modcore/html/deconoptimizingvbacode.asp

To be of real help though, we'd have to see the actual code. If you could paste it here, that would be great. If the program is really THAT big though, then maybe you could mail it to one of us to have a look at it, along with a description of what it's supposed to do and why. You can send it to me if you like, at ghandi@mailbox.co.za

Best of luck,
TM
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now