TheDugginator
New Member
- Joined
- Jul 18, 2012
- Messages
- 13
I have some code I have written that is basically supposed to open a read only copy of an Excel 2010 workbook. It then leaves it open for a period of time (long enough for a running Powerpoint slideshow to update linked data) and then closes it without attempting to save, then loop. Very simple right? Should be. But I started getting occasional blip where the the code is attempting to open a read only copy of the file but even after the instruction which specifically requests a read only copy, I get the pop up window asking me if I want to "Open a Read only copy, Notify, or Cancel". We of course, code stops and updating stops. What can I do?
Sub Updater()
'
If Workbooks.Count > 1 Then
Workbooks("WO Data Xtractor Template.xlsm").Close SaveChanges:=False
Else
End If
Workbooks.Open FileName:="\\tbbc2-me1\share\share\Departmental Board Metrics\WO Data Xtractor Tools\WO Data Xtractor Template.xlsm", ReadOnly:=True
Application.OnTime Now + TimeSerial(0, 45, 0), "Closer"
End Sub
Sub Closer()
If Workbooks.Count > 1 Then
Workbooks("WO Data Xtractor Template.xlsm").Close SaveChanges:=False
Else
End If
Application.OnTime Now + TimeSerial(0, 1, 0), "Updater"
End Sub
If the code which runs smoothly most of the time, is specifically requesting a read only copy, then why the pop up as if it was not specified? Help please.
Sub Updater()
'
If Workbooks.Count > 1 Then
Workbooks("WO Data Xtractor Template.xlsm").Close SaveChanges:=False
Else
End If
Workbooks.Open FileName:="\\tbbc2-me1\share\share\Departmental Board Metrics\WO Data Xtractor Tools\WO Data Xtractor Template.xlsm", ReadOnly:=True
Application.OnTime Now + TimeSerial(0, 45, 0), "Closer"
End Sub
Sub Closer()
If Workbooks.Count > 1 Then
Workbooks("WO Data Xtractor Template.xlsm").Close SaveChanges:=False
Else
End If
Application.OnTime Now + TimeSerial(0, 1, 0), "Updater"
End Sub
If the code which runs smoothly most of the time, is specifically requesting a read only copy, then why the pop up as if it was not specified? Help please.