ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Dealing with pop-ups (https://www.excelbanter.com/excel-programming/316030-dealing-pop-ups.html)

Jasons

Dealing with pop-ups
 

I wrote some code in VBA in order to make a excel form available fo
multiple data entry (share workbook). As the spreadsheet has som
linked data field, when people open it, it always ask for whether t
update all links.

Can VBA automate this ?

Also, I use some code to save the workbook and the workbook thus alway
ask users whether s/he want to save as a new name or replace the ol
file with the same name.

Can VBA automate this as well?

When I try to use the VBA code to make a shared workbook into exclusiv
use, it always ask user for confirmation by a pop-up (ask for yes o
no).

Can VBA automate this ?

Thanks a LOT....


Jason

--
Jason
-----------------------------------------------------------------------
Jasons's Profile: http://www.excelforum.com/member.php...fo&userid=1610
View this thread: http://www.excelforum.com/showthread.php?threadid=27602


Dave Peterson[_4_]

Dealing with pop-ups
 
The easier questions first.

Surrounding your code with
application.displayalerts = false
'your code here
application.displayalerts = true

can stop a lot of those pop up messages--like you get when you save or unshare a
workbook:

'share it
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:="C:\My Documents\excel\book2.xls", _
AccessMode:=xlShared
Application.DisplayAlerts = True


'unshare it
Application.DisplayAlerts = False
ActiveWorkbook.ExclusiveAccess
Application.DisplayAlerts = True



The links question:

You can toggle the setting (user by user, though) via:

Tools|Options|Edit Tab.
There's a checkmark for "ask to update automatic links"

But this means that you suppress the question--the links still get updated.

This setting is for the individual user--and affects all their workbooks.

If you want more control:
Try creating a dummy workbook whose only purpose is to open the original
workbook with links updated:

Kind of like:

Option Explicit
Sub auto_open()
Workbooks.Open Filename:="c:\my documents\excel\book2.xls", UpdateLinks:=1
ThisWorkbook.Close savechanges:=False
End Sub

Then you open the dummy workbook and the links will be refreshed.

And xl2002 added an option that allows you to have more control:
Edit|links|startup prompt button.
check the "don't display the alert and update links"



Jasons wrote:

I wrote some code in VBA in order to make a excel form available for
multiple data entry (share workbook). As the spreadsheet has some
linked data field, when people open it, it always ask for whether to
update all links.

Can VBA automate this ?

Also, I use some code to save the workbook and the workbook thus always
ask users whether s/he want to save as a new name or replace the old
file with the same name.

Can VBA automate this as well?

When I try to use the VBA code to make a shared workbook into exclusive
use, it always ask user for confirmation by a pop-up (ask for yes or
no).

Can VBA automate this ?

Thanks a LOT....

Jasons

--
Jasons
------------------------------------------------------------------------
Jasons's Profile: http://www.excelforum.com/member.php...o&userid=16108
View this thread: http://www.excelforum.com/showthread...hreadid=276028


--

Dave Peterson



All times are GMT +1. The time now is 01:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com