KadeFoster
New Member
- Joined
- Jan 1, 2017
- Messages
- 8
hey all,
I am trying to work out what is killing my workbook.
I open the workbook and not even a second after opening excel just shuts down. I think it has to do with my VBA in thats in ThisWorkBook >> Open Workbook Sub
It doesn't happen all the time and i cannot replicate what i was doing. I have opened and closed the workbook like 100 times and nothing, then it just happens and the workbook is broken.
Below is my code. All recommendations welcome.
I am trying to work out what is killing my workbook.
I open the workbook and not even a second after opening excel just shuts down. I think it has to do with my VBA in thats in ThisWorkBook >> Open Workbook Sub
It doesn't happen all the time and i cannot replicate what i was doing. I have opened and closed the workbook like 100 times and nothing, then it just happens and the workbook is broken.
Below is my code. All recommendations welcome.
VBA Code:
Private Sub Workbook_Open()
If Range("BOOKCOUNTER").Value = 0 Then
Range("DowntimeToyota") = 0
Range("DowntimeForklift") = 0
Range("DowntimeBobcat") = 0
Range("RedirectedForklift") = 0
Range("BOOKCOUNTER").Value = Range("BOOKCOUNTER").Value + 1
Else: Range("BOOKCOUNTER").Value = Range("BOOKCOUNTER").Value + 1
End If
End Sub