Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 430
Default Application.DisplayAlerts = False


In a Macro I have:
......
Application.ScreenUpdating = False
Application.DisplayAlerts = False
....
Set wb = Workbooks.Open(sPath & sName)
Do While sName < ""

XXXXXXXXXXXXXXXXXX << Problem here

Loop
Application.ScreenUpdating = True
Application.DisplayAlerts = True


As the Second Workbook is Opened I get
The Standard Message Warning/Alert
Dealing with Updating Links;
Update; Don't Update;

I thought my Original DisplayAlerts = False
Took care of this?

Can someone assist?

Jim

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Application.DisplayAlerts = False

Hi Jim,

Try:

Tools | Options | Edit | Uncheck "Ask to update automatic links"


---
Regards,
Norman



"Jim May" wrote in message
news:TfwDg.239$xk3.35@dukeread07...

In a Macro I have:
.....
Application.ScreenUpdating = False
Application.DisplayAlerts = False
...
Set wb = Workbooks.Open(sPath & sName)
Do While sName < ""

XXXXXXXXXXXXXXXXXX << Problem here

Loop
Application.ScreenUpdating = True
Application.DisplayAlerts = True


As the Second Workbook is Opened I get
The Standard Message Warning/Alert
Dealing with Updating Links;
Update; Don't Update;

I thought my Original DisplayAlerts = False
Took care of this?

Can someone assist?

Jim



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 430
Default Application.DisplayAlerts = False

Thanks Norman;
Is this one of those situations where this affects All Workbooks
Until you return to Tools Options, Edit and Check it back on? Also
Unchecking this does it mean that all links are updated?
Tks,
Jim

"Norman Jones" wrote in message
:

Hi Jim,

Try:

Tools | Options | Edit | Uncheck "Ask to update automatic links"


---
Regards,
Norman



"Jim May" wrote in message
news:TfwDg.239$xk3.35@dukeread07...


In a Macro I have:
.....
Application.ScreenUpdating = False
Application.DisplayAlerts = False
...
Set wb = Workbooks.Open(sPath & sName)
Do While sName < ""

XXXXXXXXXXXXXXXXXX << Problem here

Loop
Application.ScreenUpdating = True
Application.DisplayAlerts = True


As the Second Workbook is Opened I get
The Standard Message Warning/Alert
Dealing with Updating Links;
Update; Don't Update;

I thought my Original DisplayAlerts = False
Took care of this?

Can someone assist?

Jim


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Application.DisplayAlerts = False

Hi Jim,

Is this one of those situations where this affects All Workbooks
Until you return to Tools Options, Edit and Check it back on?


As you correctly surmise, this is an application setting; if you are
distributing the workbook, note that your users would similarly need to
adjust the setting.

Unchecking this does it mean that all links are updated?


Yes.

---
Regards,
Norman


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Application.DisplayAlerts = False

Hi Jim,

As Don indicates in an adjacent post, you can change the application setting
programmatically.

If you wish ajust the setting for cetain files only, you can use the
UpdateLinks argument to the Worbook's open method. This argument takes four
values:

0 Doesn't update any references
1 Updates external references but not remote references
2 Updates remote references but not external references
3 Updates both remote and external references

See VBA help on the Open method for more information.


---
Regards,
Norman




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Application.DisplayAlerts = False

Just a thought:
If you wish ajust the setting for cetain files only, you can use the


The end result will be the same, but to me it would be better to say not
that it is changing the setting for that workbook but it is specifing the
action to take for that single opening of the workbook.

Set wb = Workbooks.Open(sPath & sName, Updatelinks:=0)

--
Regards,
Tom Ogilvy


"Norman Jones" wrote in message
...
Hi Jim,

As Don indicates in an adjacent post, you can change the application
setting programmatically.

If you wish ajust the setting for cetain files only, you can use the
UpdateLinks argument to the Worbook's open method. This argument takes
four values:

0 Doesn't update any references
1 Updates external references but not remote references
2 Updates remote references but not external references
3 Updates both remote and external references

See VBA help on the Open method for more information.


---
Regards,
Norman



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 300
Default Application.DisplayAlerts = False

On Sun, 13 Aug 2006 02:37:39 +0000, "Jim May" wrote:

As the Second Workbook is Opened I get
The Standard Message Warning/Alert
Dealing with Updating Links;
Update; Don't Update;

I thought my Original DisplayAlerts = False
Took care of this?


Try Application.AskToUpdateLinks = False

Don <www.donwiss.com (e-mail link at home page bottom).
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Application.DisplayAlerts = False


I have several report templates (spreadsheets) in one workbook. A use
can select one (or more) reports in vb screen (application is writte
in vb 6), data from a database are processed and send to the Exce
template - then unnecessary worksheets are deleted. It works perfectl
at the first run. If I repeat the procedure
Application.DisplayAlerts=False does not work, in other words excessiv
worksheets are not being deleted. Magic!
This is the procedu
Public Sub RemoveExtraSheets(ByRef s As String)

Dim eItem As Excel.Worksheet

For Each eItem In xlAppl.ActiveWorkbook.Worksheets

Application.DisplayAlerts = False

If InStr(eItem.Name, s) = 0 Then
eItem.Delete
End If
Next
Application.DisplayAlerts = True

End Su

--
kotelo
-----------------------------------------------------------------------
kotelok's Profile: http://www.excelforum.com/member.php...fo&userid=3772
View this thread: http://www.excelforum.com/showthread.php?threadid=57111

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default Application.DisplayAlerts = False

I would imagine the
InStr(eItem.Name, s)=0
is evaluating to False

If you run it on the same workbook, the first time all the WS are deleted,
so there are no more that qualify the second time.

NickHK

"kotelok" ¼¶¼g©ó¶l¥ó·s»D:kotelok.2cquff_1155918007.0754@exce lforum-nospam.com...

I have several report templates (spreadsheets) in one workbook. A user
can select one (or more) reports in vb screen (application is written
in vb 6), data from a database are processed and send to the Excel
template - then unnecessary worksheets are deleted. It works perfectly
at the first run. If I repeat the procedure -
Application.DisplayAlerts=False does not work, in other words excessive
worksheets are not being deleted. Magic!
This is the procedu
Public Sub RemoveExtraSheets(ByRef s As String)

Dim eItem As Excel.Worksheet

For Each eItem In xlAppl.ActiveWorkbook.Worksheets

Application.DisplayAlerts = False

If InStr(eItem.Name, s) = 0 Then
eItem.Delete
End If
Next
Application.DisplayAlerts = True

End Sub


--
kotelok
------------------------------------------------------------------------
kotelok's Profile:
http://www.excelforum.com/member.php...o&userid=37725
View this thread: http://www.excelforum.com/showthread...hreadid=571110



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 = False - Not Working [email protected] Excel Programming 3 March 1st 06 08:39 PM
Where to put DisplayAlerts = False Joe Fish Excel Programming 2 October 22nd 05 09:13 PM
Can't Set DisplayAlerts to False Mark Driscol Excel Programming 0 April 7th 04 06:11 PM
Can't Set DisplayAlerts to False Mark Driscol Excel Programming 1 April 6th 04 10:45 PM
Can't Set DisplayAlerts to False Mark Driscol Excel Programming 2 April 2nd 04 12:28 PM


All times are GMT +1. The time now is 10:43 AM.

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

About Us

"It's about Microsoft Excel"