Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Application.DisplayAlerts problem

I'm using Office 2003. I have this code

Application.DisplayAlerts = False
oWS.Copy after:=oWS
Application.DisplayAlerts = True

When I step through the first line, and hover over
Application.DisplayAlerts, it still shows as TRUE. And when the copy
occurs, I get a run time error. The sheet you are copying has more than 255
characters, blah blah blah. I know it does. That's why I do other things
later to capture all of the data. Why am I having DisplayAlerts problems
here?

Thanks,
Barb Reinhardt

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Application.DisplayAlerts problem

Hi,

I can't comment on the runtime error but i'm not surprised hovering over the
line shows displayalerts as TRUE it always does. Displayalerts being set to
false won't supress runtime errors.

Mike

"Barb Reinhardt" wrote:

I'm using Office 2003. I have this code

Application.DisplayAlerts = False
oWS.Copy after:=oWS
Application.DisplayAlerts = True

When I step through the first line, and hover over
Application.DisplayAlerts, it still shows as TRUE. And when the copy
occurs, I get a run time error. The sheet you are copying has more than 255
characters, blah blah blah. I know it does. That's why I do other things
later to capture all of the data. Why am I having DisplayAlerts problems
here?

Thanks,
Barb Reinhardt

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Application.DisplayAlerts problem

To demonstrate the phenomen try this small routine and hover over the first
line.

Application.DisplayAlerts = False
If Application.DisplayAlerts = True Then
MsgBox "enabled"
Else
MsgBox "Disabled"
End If
Stop
Application.DisplayAlerts = True
Stop

Mike

"Mike H" wrote:

Hi,

I can't comment on the runtime error but i'm not surprised hovering over the
line shows displayalerts as TRUE it always does. Displayalerts being set to
false won't supress runtime errors.

Mike

"Barb Reinhardt" wrote:

I'm using Office 2003. I have this code

Application.DisplayAlerts = False
oWS.Copy after:=oWS
Application.DisplayAlerts = True

When I step through the first line, and hover over
Application.DisplayAlerts, it still shows as TRUE. And when the copy
occurs, I get a run time error. The sheet you are copying has more than 255
characters, blah blah blah. I know it does. That's why I do other things
later to capture all of the data. Why am I having DisplayAlerts problems
here?

Thanks,
Barb Reinhardt

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Application.DisplayAlerts problem

Mike,

I just ran the same piece of code again and no run time errors. All I did
was log off and log back on a while back. Can you explain that?

Thanks,
Barb



"Mike H" wrote:

To demonstrate the phenomen try this small routine and hover over the first
line.

Application.DisplayAlerts = False
If Application.DisplayAlerts = True Then
MsgBox "enabled"
Else
MsgBox "Disabled"
End If
Stop
Application.DisplayAlerts = True
Stop

Mike

"Mike H" wrote:

Hi,

I can't comment on the runtime error but i'm not surprised hovering over the
line shows displayalerts as TRUE it always does. Displayalerts being set to
false won't supress runtime errors.

Mike

"Barb Reinhardt" wrote:

I'm using Office 2003. I have this code

Application.DisplayAlerts = False
oWS.Copy after:=oWS
Application.DisplayAlerts = True

When I step through the first line, and hover over
Application.DisplayAlerts, it still shows as TRUE. And when the copy
occurs, I get a run time error. The sheet you are copying has more than 255
characters, blah blah blah. I know it does. That's why I do other things
later to capture all of the data. Why am I having DisplayAlerts problems
here?

Thanks,
Barb Reinhardt

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Application.DisplayAlerts OlieH Excel Programming 5 March 15th 07 04:02 PM
Application.DisplayAlerts TK Excel Programming 4 April 7th 05 08:41 PM
Application.DisplayAlerts in IE scoobydeux Excel Programming 1 April 19th 04 01:28 AM
Application::DisplayAlerts not working Howard Dierking Excel Programming 2 February 11th 04 12:04 PM
application.displayalerts Erin[_5_] Excel Programming 1 December 4th 03 03:49 PM


All times are GMT +1. The time now is 06:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"