#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA Project

I have written an extensive VBA project in Excel 2003 which my company uses
to track job and crew information. Recently, this project, which has been
used for the last year and a half, has been producing code errors. Today, it
wil not even open without erroring to the recover screen and the recovery has
lost the VBA project after recovery.
I have a feeling that this is related to Microsoft Updates.
Anyone having these problems?? Any Solutions??
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default VBA Project

Norman

On some of it I can't be more detailed because it doesn't give me the chance
to see the error, but the error log appears below....

Microsoft Office Excel File Repair Log

Errors were detected in file 'L:\DATA\210 Office\210 Weekly
Tracking\2008-5-31.xls'
The following is a list of repairs:

Lost Visual Basic project.
Lost ActiveX controls.

Additionally, I copied two sub-routines that have worked since I wrote them,
they are Called by "Worbook_Open". All of the sudden, it produces a run-time
error at the line I marked with (Error). If I stop the debugger and run the
procedure, it works fine but it will not work when called during the opening
of the workbook.

Sub TempName() 'From Module2.DeleteCrew() and Module2.AddCrew() and
Workbook_Open
Dim OldSheet As Excel.Worksheet
Dim n As Integer, t As Integer
Application.ScreenUpdating = False
t = 1
For n = 8 To 44
Set OldSheet = Sheets(n)
OldSheet.Name = "Temp" & t 'Rename Sheets a "Temp#" before they are
sorted
t = t + 1
Next n
Set OldSheet = Nothing
End Sub

Sub NewName() 'From Module2.DeleteCrew() and Module2.AddCrew() and
Workbook_Open
Dim TempSheet As Excel.Worksheet
Dim n As Integer, t As Integer
Dim ShtName As String
Application.ScreenUpdating = False
t = 1
For n = 8 To 44 'Run through each crew sheet
Set TempSheet = Sheets(n)
ShtName = "Temp" & t
(Error)TempSheet.Name = Sheets(ShtName).Cells(2, 3) 'Rename sheets after
they are sorted
t = t + 1 'from "Temp#" to actual
crew names stored in sheets
Next n
Set TempSheet = Nothing 'Clear Variable
End Sub


"Norman Jones" wrote:

Hi Steve,

In order to facilitate usful responses, you
should provide detailed informaation about
the errors.



---
Regards.
Norman


"Steve Peel" <Steve wrote in message
...
I have written an extensive VBA project in Excel 2003 which my company uses
to track job and crew information. Recently, this project, which has been
used for the last year and a half, has been producing code errors. Today,
it
wil not even open without erroring to the recover screen and the recovery
has
lost the VBA project after recovery.
I have a feeling that this is related to Microsoft Updates.
Anyone having these problems?? Any Solutions??



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
macro is not saved in project but in a project.txt version Janis Excel Programming 3 September 3rd 06 12:08 AM
With VBA from Excel: Open Project, extract resource list and copy it to a worksheet, close project. Tony Excel Programming 1 October 18th 05 03:53 PM
HELP!!!! VBA Project Locked - Project Unviewable poppy Excel Programming 3 November 30th 04 08:59 PM
Assigning the Help 4, *.HLP file for a project programmatically in a protected Project Tony Seiscons Excel Programming 0 October 4th 04 03:10 PM
Accesing vba project from wb that has vba project password protected cassidyr1 Excel Programming 2 July 3rd 04 01:49 PM


All times are GMT +1. The time now is 08:53 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"