Solved

vba word help

Posted on 2004-10-08
1
145 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
thunder_moose earned 500 total points
ID: 12259659
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

691 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