PC Review


Reply
Thread Tools Rate Thread

Application.DisplayAlerts problem

 
 
Barb Reinhardt
Guest
Posts: n/a
 
      18th Jul 2008
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 With Quote
 
 
 
 
Mike H
Guest
Posts: n/a
 
      18th Jul 2008
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 With Quote
 
Mike H
Guest
Posts: n/a
 
      18th Jul 2008
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 With Quote
 
Barb Reinhardt
Guest
Posts: n/a
 
      19th Jul 2008
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
application.displayalerts Steve J Microsoft Excel Programming 3 8th Dec 2009 06:12 AM
Application.DisplayAlerts Jac Tremblay Microsoft Access VBA Modules 4 12th Mar 2008 03:49 PM
Application.DisplayAlerts =?Utf-8?B?VEs=?= Microsoft Excel Programming 3 7th Apr 2005 01:44 PM
Problem with Application.DisplayAlerts mjb267 Microsoft Excel Misc 2 1st Apr 2004 02:58 AM
application.displayalerts Erin Microsoft Excel Programming 1 4th Dec 2003 03:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:49 AM.