Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Run Time Error '1004'
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. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
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. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Run Time Error '1004'
I think the issue is larger but am unsure how to attack it. I rem'd out
those lines to avoid them from being executed and I was able to open up the spreadsheet fine. I thought it was fixed so sent out a notice stating such. Unfortunately it is still bombing on the users who are using Excel97 even though it works for me on Excel2002. It does not even provide any error messages for them, just quits. I made a copy of it and deleted every sheet, every macro, and every line of code I could find. All that was left was a new blank sheet. STILL the file just bombs when opened in Excel97 but works fine in 2002. Any ideas on how I could troubleshoot this? "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. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Run Time Error '1004'
When multiple sheets are selected, you'll see [Group] in the title bar. This
means that lots of things that lots of things you do to one sheet, you do to all the sheets in the group. But there are somethings that can't be done when the worksheets are grouped--including changing protection. You can ungroup sheets manually by just rightclicking on one of the worksheets that are grouped (notice the background color of the worksheet tabs) and selecting Ungroup Sheets. In code, you can select a single sheet. Private Sub Workbook_Open() With Sheets("Olean - Wellsville") .select .EnableAutoFilter = True .Protect contents:=True, userInterfaceOnly:=True End With End Sub 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. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Hot key for time? | Excel Worksheet Functions | |||
time sheet drop down lists | Excel Discussion (Misc queries) | |||
time entry with am/pm and no colons | Excel Discussion (Misc queries) | |||
Entering Times | Excel Discussion (Misc queries) | |||
time differences in a column | Excel Worksheet Functions |