View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
CLR
 
Posts: n/a
Default Run Time Error '1004'

Looks like maybe a linefeed problem......try combining the two lines

Sheets("Olean - Wellsville").Protect contents:=True,
userInterfaceOnly:=True

to be all on one line,...........

Vaya con Dios,
Chuck, CABGx3


"Carpie" wrote:

A spreadsheet that is used by many different people is coming up with the
subject error now which is defined as an "Application-defined or
Object-Defined error". It gives me the chance to end or debug. When I
choose debug it takes me to code that states:

Private Sub Workbook_Open()
Sheets("Olean - Wellsville").EnableAutoFilter = True
Sheets("Olean - Wellsville").Protect contents:=True,
userInterfaceOnly:=True
End Sub

The third line is the one that it is highlighted in Yellow. I'm not versed
in VBA so I have no idea what seems to be the issue but am guessing that
somehow the syntax has been altered. Based on this limited information I
have provided, are you able to help?

I should also mention that when I open the file [Group] is appended to the
file name. I don't have any idea what that means.