Thread: Shared Workbook
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
John Pierce John Pierce is offline
external usenet poster
 
Posts: 93
Default Shared Workbook

What is it about this little bit of code that makes it give Error 1004
when the Workbook is shared but it works fine when the wb is not
shared?

Private Sub SaveRecord()

ActiveWorkbook.Save
LocateFirstEmptyRow
On Error GoTo ErrorHandler

ActiveSheet.Unprotect

With ActiveCell
.Value = cmbIndividuals
.Offset(0, 1).Value = cmbManagers
.Offset(0, 2).Value = cmbTeams
End With

ErrorHandler:
ActiveWorkbook.Save
LocateFirstEmptyRow

End Sub

Public Sub LocateFirstEmptyRow()
Range("B65536").Select
Selection.End(xlUp).Select
ActiveCell.Offset(1, 0).Range("A1").Activate
End Sub