Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
KR KR is offline
external usenet poster
 
Posts: 121
Default Enable macros = HD/CPU issues- help! any ideas?

As of about 24 hours ago, I've been having issues where my PC slows down
considerably (600%+) including almost continuous HD access. I've narrowed it
down via many reboots, and it appears to only happen when I open the one
Excel file I've been working on, and only when macros are enabled. Yesterday
during the day, I could run my macro in under 30 seconds, now it takes
several minutes. I have not made any substantial changes in that time, I was
mostly tweaking the width of columns being imported from a text file.

I re-verified my Office installation, in case any of those files had become
corrupt. I also used Rob Bovey's code cleaner on the file. Unfortunately,
any time I open with Macros enabled, I keep getting the same problem. I have
opened another file with a short macro and didn't get the same problems.

My file (which is local on my machine, not on a network) has a few global
variables and public arrays (below), but no code that would automatically
run (no 'on_open' code or anything else- except for my declarations at the
top, everything is within a macro that only runs when I tell it to.)

So I'm confused, and I have no idea what else to check. I would think if the
workbook had a problem in the macros, the code cleaner should have
eliminated it. Opening with macros disabled takes <5 seconds, with macros is
45 seconds before I can even select a cell. Opening the VBE takes a while
also. Then when I give up, closing the file (without saving) takes more than
5 minutes, with the HD accessing/crunching away the whole time, locking up
the PC until it is done. The file itself is about 3.5 Megs, mostly
unformatted cells from imported text files. . I currently do not have any
add-ins installed (I removed the code cleaner after using it, but the
problem started before I installed it).

Please, please, please offer any ideas- This project is due next week, and I
can't possibly finish it with it this problem locking up the machine.

Many, many thanks,
Keith

---------------------------------------------------------------------------
The only stuff outside of the macro itself are the following, in two
modules:
but this is all the same since before the problem started occurring.
---------------------------------------------------------------------------
Const MaxRoadblockRows = 500
Const MaxUIRRows = 3000
Public UIROutArray(1 To 65000, 1 To 20, 1 To 20) As Variant
Option Base 1

Const tPath As String = "C:\Documents and
Settings\PRnIIS\Desktop\MyWorkingFiles\"
Const tSuffix As String = ".txt"
Const File1 As String = "File1"
Const File2 As String = "File2"
Const File3 As String = "File3"
Const File4 As String = "File4"
Const File5 As String = "File5"
Const File6 As String = "File6"
Const NumFilesUsed = 4
Public Usecol As String
Dim TotalFileArray(1 To 6, 1 To 30) As Integer
Public TotalDataArray(1 To 6, 1 To 30, 1 To 65000) As Variant




--
The enclosed questions or comments are entirely mine and don't represent the
thoughts, views, or policy of my employer. Any errors or omissions are my
own.


  #2   Report Post  
Posted to microsoft.public.excel.programming
ben ben is offline
external usenet poster
 
Posts: 232
Default Enable macros = HD/CPU issues- help! any ideas?

just a suggestion (may not even be right) clean out your temp file. Close all
office programs and open my documents/"current user"/local settings/temp/
and clear out all .emf and all .tmp files just delete them.
ben


"KR" wrote:

As of about 24 hours ago, I've been having issues where my PC slows down
considerably (600%+) including almost continuous HD access. I've narrowed it
down via many reboots, and it appears to only happen when I open the one
Excel file I've been working on, and only when macros are enabled. Yesterday
during the day, I could run my macro in under 30 seconds, now it takes
several minutes. I have not made any substantial changes in that time, I was
mostly tweaking the width of columns being imported from a text file.

I re-verified my Office installation, in case any of those files had become
corrupt. I also used Rob Bovey's code cleaner on the file. Unfortunately,
any time I open with Macros enabled, I keep getting the same problem. I have
opened another file with a short macro and didn't get the same problems.

My file (which is local on my machine, not on a network) has a few global
variables and public arrays (below), but no code that would automatically
run (no 'on_open' code or anything else- except for my declarations at the
top, everything is within a macro that only runs when I tell it to.)

So I'm confused, and I have no idea what else to check. I would think if the
workbook had a problem in the macros, the code cleaner should have
eliminated it. Opening with macros disabled takes <5 seconds, with macros is
45 seconds before I can even select a cell. Opening the VBE takes a while
also. Then when I give up, closing the file (without saving) takes more than
5 minutes, with the HD accessing/crunching away the whole time, locking up
the PC until it is done. The file itself is about 3.5 Megs, mostly
unformatted cells from imported text files. . I currently do not have any
add-ins installed (I removed the code cleaner after using it, but the
problem started before I installed it).

Please, please, please offer any ideas- This project is due next week, and I
can't possibly finish it with it this problem locking up the machine.

Many, many thanks,
Keith

---------------------------------------------------------------------------
The only stuff outside of the macro itself are the following, in two
modules:
but this is all the same since before the problem started occurring.
---------------------------------------------------------------------------
Const MaxRoadblockRows = 500
Const MaxUIRRows = 3000
Public UIROutArray(1 To 65000, 1 To 20, 1 To 20) As Variant
Option Base 1

Const tPath As String = "C:\Documents and
Settings\PRnIIS\Desktop\MyWorkingFiles\"
Const tSuffix As String = ".txt"
Const File1 As String = "File1"
Const File2 As String = "File2"
Const File3 As String = "File3"
Const File4 As String = "File4"
Const File5 As String = "File5"
Const File6 As String = "File6"
Const NumFilesUsed = 4
Public Usecol As String
Dim TotalFileArray(1 To 6, 1 To 30) As Integer
Public TotalDataArray(1 To 6, 1 To 30, 1 To 65000) As Variant




--
The enclosed questions or comments are entirely mine and don't represent the
thoughts, views, or policy of my employer. Any errors or omissions are my
own.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to enable macros Ollakal Excel Discussion (Misc queries) 1 October 19th 05 05:58 AM
can not enable macros Tricia Excel Worksheet Functions 2 August 24th 05 11:18 PM
Enable Macros MESTRELLA29[_2_] Excel Programming 2 March 15th 05 10:41 PM
macros enable myfanwy New Users to Excel 2 February 6th 05 10:01 PM
Suppress the Disable Macros / Enable Macros Dialog Shoji Karai Excel Programming 5 September 24th 03 03:10 AM


All times are GMT +1. The time now is 04:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"