but do remember to set to true afterwards.
--
HTH
RP
(remove nothere from the email address if mailing direct)
"keepITcool" wrote in message
ft.com...
ken
process the files while
application.enableevents=false
then the workbook_open and all other events wont fire.
--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam
Ken Loomis wrote :
Can you please suggest how to do that in VBA?
thanks,
Kemn
"JMB" wrote in message
...
One way is to hold down the SHIFT key when opening the file in
Excel.
Also, Excel has a command line switch that prevents workbooks from
opening automatically as well as prevents auto-open macros from
running.
Excel.exe /automation
"Ken Loomis" wrote:
When I created the latest versions of my Excel project, I included
this code:
Private Sub Workbook_Open()
CopyrightAnnouncement
End Sub
Sub CopyrightAnnouncement()
Dim Config As Integer
Dim Ans As Integer
Config = vbYesNo + vbQuestion + vbDefaultButton2
Ans = MsgBox("This program is copyrigted and is currently only
licensed on loan to and for the exclusive use of Sherri Allen. All
rights are retained by the owner and deleveloper, Ken Loomis. Are
you Sherri Allen?", Config)
If Ans < vbYes Then
ActiveWindow.Close
End If
End Sub
I though that would help me be sure that only one person used this
file.
But now that I need to open and fix all the files that this
project created, it seems to be a problem.
Is there a way to open those files without having to make the user
answer that dialog box?
Thanks,
Ken