Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Display alerts error
Hi,
Within a Sub I have the following code fragment: Application.ScreenUpdating = False Application.DisplayAlerts = False If SheetExists("Sheet3") Then Sheets("Sheet3").Delete Application.DisplayAlerts = True This works fine in Excel 2000 but a user using Excel 2002 has reported the following error: Method "display Alerts" of object '_Application' failed. I cant see why the error is being raised. Is there a problem in 2002? Is there a solution? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Display alerts error
Presumably your UDF SheetExists is causing the problem - post this code for
diagnosis. -- Cheers Nigel "AWSD" wrote in message ... Hi, Within a Sub I have the following code fragment: Application.ScreenUpdating = False Application.DisplayAlerts = False If SheetExists("Sheet3") Then Sheets("Sheet3").Delete Application.DisplayAlerts = True This works fine in Excel 2000 but a user using Excel 2002 has reported the following error: Method "display Alerts" of object '_Application' failed. I cant see why the error is being raised. Is there a problem in 2002? Is there a solution? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Display alerts error
I don't see how as the error is specific to the Application object. Here is
the code Function SheetExists(ByVal sName As String) As Boolean On Error GoTo not_found Sheets(sName).Select SheetExists = True Exit Function not_found: SheetExists = False End Function "Nigel" wrote: Presumably your UDF SheetExists is causing the problem - post this code for diagnosis. -- Cheers Nigel "AWSD" wrote in message ... Hi, Within a Sub I have the following code fragment: Application.ScreenUpdating = False Application.DisplayAlerts = False If SheetExists("Sheet3") Then Sheets("Sheet3").Delete Application.DisplayAlerts = True This works fine in Excel 2000 but a user using Excel 2002 has reported the following error: Method "display Alerts" of object '_Application' failed. I cant see why the error is being raised. Is there a problem in 2002? Is there a solution? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Display alerts error
That is a peculiar error. Is this code being executed within Excel and
written in VBA? -- Regards, Tom Ogilvy "AWSD" wrote in message ... Hi, Within a Sub I have the following code fragment: Application.ScreenUpdating = False Application.DisplayAlerts = False If SheetExists("Sheet3") Then Sheets("Sheet3").Delete Application.DisplayAlerts = True This works fine in Excel 2000 but a user using Excel 2002 has reported the following error: Method "display Alerts" of object '_Application' failed. I cant see why the error is being raised. Is there a problem in 2002? Is there a solution? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Display alerts error
Yes, it is executed within Excel and written in VBA. It is executed when the
user clicks a button. "Tom Ogilvy" wrote: That is a peculiar error. Is this code being executed within Excel and written in VBA? -- Regards, Tom Ogilvy "AWSD" wrote in message ... Hi, Within a Sub I have the following code fragment: Application.ScreenUpdating = False Application.DisplayAlerts = False If SheetExists("Sheet3") Then Sheets("Sheet3").Delete Application.DisplayAlerts = True This works fine in Excel 2000 but a user using Excel 2002 has reported the following error: Method "display Alerts" of object '_Application' failed. I cant see why the error is being raised. Is there a problem in 2002? Is there a solution? |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Display alerts error
I would remove the selection from the SheetsExists routine.
Function SheetExists(ByVal sName As String) As Boolean Dim sh as Object On Error GoTo not_found set sh = Sheets(sName) SheetExists = True Exit Function not_found: SheetExists = False End Function -- Regards, Tom Ogilvy "AWSD" wrote in message ... Yes, it is executed within Excel and written in VBA. It is executed when the user clicks a button. "Tom Ogilvy" wrote: That is a peculiar error. Is this code being executed within Excel and written in VBA? -- Regards, Tom Ogilvy "AWSD" wrote in message ... Hi, Within a Sub I have the following code fragment: Application.ScreenUpdating = False Application.DisplayAlerts = False If SheetExists("Sheet3") Then Sheets("Sheet3").Delete Application.DisplayAlerts = True This works fine in Excel 2000 but a user using Excel 2002 has reported the following error: Method "display Alerts" of object '_Application' failed. I cant see why the error is being raised. Is there a problem in 2002? Is there a solution? |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Display alerts error
Nothing in the code that shouldn't work in Excel 2002. I assume the code
isn't in the sheet module for Sheet3. -- Regards, Tom Ogilvy "AWSD" wrote in message ... Yes, it is executed within Excel and written in VBA. It is executed when the user clicks a button. "Tom Ogilvy" wrote: That is a peculiar error. Is this code being executed within Excel and written in VBA? -- Regards, Tom Ogilvy "AWSD" wrote in message ... Hi, Within a Sub I have the following code fragment: Application.ScreenUpdating = False Application.DisplayAlerts = False If SheetExists("Sheet3") Then Sheets("Sheet3").Delete Application.DisplayAlerts = True This works fine in Excel 2000 but a user using Excel 2002 has reported the following error: Method "display Alerts" of object '_Application' failed. I cant see why the error is being raised. Is there a problem in 2002? Is there a solution? |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Display alerts error
this was a false start reply I was trying to delete and hit the send button
by mistake. Please ignore. -- Regards, Tom Ogilvy "Tom Ogilvy" wrote in message ... Nothing in the code that shouldn't work in Excel 2002. I assume the code isn't in the sheet module for Sheet3. -- Regards, Tom Ogilvy "AWSD" wrote in message ... Yes, it is executed within Excel and written in VBA. It is executed when the user clicks a button. "Tom Ogilvy" wrote: That is a peculiar error. Is this code being executed within Excel and written in VBA? -- Regards, Tom Ogilvy "AWSD" wrote in message ... Hi, Within a Sub I have the following code fragment: Application.ScreenUpdating = False Application.DisplayAlerts = False If SheetExists("Sheet3") Then Sheets("Sheet3").Delete Application.DisplayAlerts = True This works fine in Excel 2000 but a user using Excel 2002 has reported the following error: Method "display Alerts" of object '_Application' failed. I cant see why the error is being raised. Is there a problem in 2002? Is there a solution? |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
Display alerts error
I didn't either but since there was no other source of any error I just felt
seeing this might help - as I see it is very strange indeed. Cannot offer a solution - sorry -- Cheers Nigel "AWSD" wrote in message ... I don't see how as the error is specific to the Application object. Here is the code Function SheetExists(ByVal sName As String) As Boolean On Error GoTo not_found Sheets(sName).Select SheetExists = True Exit Function not_found: SheetExists = False End Function "Nigel" wrote: Presumably your UDF SheetExists is causing the problem - post this code for diagnosis. -- Cheers Nigel "AWSD" wrote in message ... Hi, Within a Sub I have the following code fragment: Application.ScreenUpdating = False Application.DisplayAlerts = False If SheetExists("Sheet3") Then Sheets("Sheet3").Delete Application.DisplayAlerts = True This works fine in Excel 2000 but a user using Excel 2002 has reported the following error: Method "display Alerts" of object '_Application' failed. I cant see why the error is being raised. Is there a problem in 2002? Is there a solution? |
#10
Posted to microsoft.public.excel.programming
|
|||
|
|||
Display alerts error
Thanks, I'll give it a go.
"Tom Ogilvy" wrote: I would remove the selection from the SheetsExists routine. Function SheetExists(ByVal sName As String) As Boolean Dim sh as Object On Error GoTo not_found set sh = Sheets(sName) SheetExists = True Exit Function not_found: SheetExists = False End Function -- Regards, Tom Ogilvy "AWSD" wrote in message ... Yes, it is executed within Excel and written in VBA. It is executed when the user clicks a button. "Tom Ogilvy" wrote: That is a peculiar error. Is this code being executed within Excel and written in VBA? -- Regards, Tom Ogilvy "AWSD" wrote in message ... Hi, Within a Sub I have the following code fragment: Application.ScreenUpdating = False Application.DisplayAlerts = False If SheetExists("Sheet3") Then Sheets("Sheet3").Delete Application.DisplayAlerts = True This works fine in Excel 2000 but a user using Excel 2002 has reported the following error: Method "display Alerts" of object '_Application' failed. I cant see why the error is being raised. Is there a problem in 2002? Is there a solution? |
#11
Posted to microsoft.public.excel.programming
|
|||
|
|||
Display alerts error
No, the code is not in a sheet module.
"Tom Ogilvy" wrote: Nothing in the code that shouldn't work in Excel 2002. I assume the code isn't in the sheet module for Sheet3. -- Regards, Tom Ogilvy "AWSD" wrote in message ... Yes, it is executed within Excel and written in VBA. It is executed when the user clicks a button. "Tom Ogilvy" wrote: That is a peculiar error. Is this code being executed within Excel and written in VBA? -- Regards, Tom Ogilvy "AWSD" wrote in message ... Hi, Within a Sub I have the following code fragment: Application.ScreenUpdating = False Application.DisplayAlerts = False If SheetExists("Sheet3") Then Sheets("Sheet3").Delete Application.DisplayAlerts = True This works fine in Excel 2000 but a user using Excel 2002 has reported the following error: Method "display Alerts" of object '_Application' failed. I cant see why the error is being raised. Is there a problem in 2002? Is there a solution? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Display Alerts | Excel Discussion (Misc queries) | |||
Stopping Display Alerts | Excel Programming | |||
Display Alerts | Excel Programming | |||
Display Alerts | Excel Programming | |||
Code to not display delete sheet alerts | Excel Programming |