Does anyone know why a VBA would stop with out an error? It just runs and then stops in the middle of what it is doing? Here is the code:
If Range("c18").Value Then
Application.ScreenUpdating = False
Workbooks.Open FileName:= _
"\serverfolderMaterialsJimFJim.xls", _
UpdateLinks:=3, WriteResPassword:="jim"
'check to see if read only
If ActiveWorkbook.ReadOnly Then
ActiveWorkbook.Saved = True
ActiveWorkbook.Close
Range("e18").Select
Application.ScreenUpdating = True
ActiveCell.FormulaR1C1 = "Not Updated"
GoTo lastlinejim:
End If
'update file
Range("a1").Select
ActiveWorkbook.Save
ActiveWindow.Close
Range("i18").Select
ActiveCell.FormulaR1C1 = "Updated"
Application.ScreenUpdating = True
lastlinejim:
Range("a1").Select
End If
'displayed if not selected
If Range("c18") <> "True" Then
Range("e18").Select
ActiveCell.FormulaR1C1 = "Not Selected"
If Range("c18").Value Then
Application.ScreenUpdating = False
Workbooks.Open FileName:= _
"\serverfolderMaterialsJimFJim.xls", _
UpdateLinks:=3, WriteResPassword:="jim"
'check to see if read only
If ActiveWorkbook.ReadOnly Then
ActiveWorkbook.Saved = True
ActiveWorkbook.Close
Range("e18").Select
Application.ScreenUpdating = True
ActiveCell.FormulaR1C1 = "Not Updated"
GoTo lastlinejim:
End If
'update file
Range("a1").Select
ActiveWorkbook.Save
ActiveWindow.Close
Range("i18").Select
ActiveCell.FormulaR1C1 = "Updated"
Application.ScreenUpdating = True
lastlinejim:
Range("a1").Select
End If
'displayed if not selected
If Range("c18") <> "True" Then
Range("e18").Select
ActiveCell.FormulaR1C1 = "Not Selected"