Hello all,
I am opening up a workbook which, the workbook module has not changed but all of a sudden I am getting above error message, this happens upon opening. I can click end and it gives me no option to debug
The open code is as follows
The application.display alerts and subsequent code do not action. I can tell this because of the screen flicker I get and the workbook does not open on the correct sheet
I do have a code set in the closing of the workbook which I can send it that helps
I have one PC where I have not actioned Microsofr user updates....when I open this workbook on that machine, I don't get the problem. I only get the error on the machine I did do the updates on
Any ideas please ??
Thanks
Paul
I am opening up a workbook which, the workbook module has not changed but all of a sudden I am getting above error message, this happens upon opening. I can click end and it gives me no option to debug
The open code is as follows
Code:
Private Sub Workbook_Open()
Application.ScreenUpdating = False
Application.ErrorCheckingOptions.BackgroundChecking = False
Application.Calculation = xlCalculationManual
Application.DisplayAlerts = True
Worksheets("Restriction").Range("a$1") = 1
Worksheets("Restriction").Range("a$17") = "Incite Version 14 is opening"
Worksheets("Restriction").Calculate
With Application
.CalculateBeforeSave = True
End With
Sheets("Staff Data").Visible = True
Sheets("March").Visible = True
Sheets("April").Visible = True
Sheets("May").Visible = True
Sheets("June").Visible = True
Sheets("July").Visible = True
Sheets("August").Visible = True
Sheets("September").Visible = True
Sheets("October").Visible = True
Sheets("November").Visible = True
Sheets("December").Visible = True
Sheets("January").Visible = True
Sheets("February").Visible = True
Sheets("Charts").Visible = True
Sheets("Data").Visible = True
Sheets("Stat Data").Visible = True
Sheets("Restriction").Visible = xlVeryHidden
ThisWorkbook.Saved = True
If ActiveWorkbook.ReadOnly = True Then
Exit Sub
Else
If Environ("username") <> "Paulha" And Environ("username") <> "paulha" And Environ("username") <> "Paul Hailes" Then ActiveWorkbook.ChangeFileAccess xlReadOnly
End If
Application.ScreenUpdating = True
End Sub
Private Sub Workbook_BeforeClose(cancel As Boolean)
If ActiveWorkbook.ReadOnly = True Then
ThisWorkbook.Saved = True
Else
Worksheets("Restriction").Range("a$17") = "Incite Version 14 is closing"
Worksheets("Restriction").Calculate
Sheets("Restriction").Visible = True
Sheets("Staff Data").Visible = xlVeryHidden
Sheets("March").Visible = xlVeryHidden
Sheets("April").Visible = xlVeryHidden
Sheets("May").Visible = xlVeryHidden
Sheets("June").Visible = xlVeryHidden
Sheets("July").Visible = xlVeryHidden
Sheets("August").Visible = xlVeryHidden
Sheets("September").Visible = xlVeryHidden
Sheets("October").Visible = xlVeryHidden
Sheets("November").Visible = xlVeryHidden
Sheets("December").Visible = xlVeryHidden
Sheets("January").Visible = xlVeryHidden
Sheets("February").Visible = xlVeryHidden
Sheets("Charts").Visible = xlVeryHidden
Sheets("Data").Visible = xlVeryHidden
Sheets("Stat Data").Visible = xlVeryHidden
With Application
.CalculateBeforeSave = False
End With
Worksheets("Restriction").Range("$a$1") = 0
Application.DisplayAlerts = False
ActiveWorkbook.Save
End If
End Sub
The application.display alerts and subsequent code do not action. I can tell this because of the screen flicker I get and the workbook does not open on the correct sheet
I do have a code set in the closing of the workbook which I can send it that helps
I have one PC where I have not actioned Microsofr user updates....when I open this workbook on that machine, I don't get the problem. I only get the error on the machine I did do the updates on
Any ideas please ??
Thanks
Paul