Go Back   Access World Forums > Microsoft Access Discussion > Modules & VBA

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 09-11-2005, 09:43 AM   #1
aamirault
Registered User
 
Join Date: Aug 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
aamirault is on a distinguished road
Stop "File now Available for Editing" box from openning

Hi,

I have code that imports data from excel, and it works great however the problem is an annoying pop up once the import is done telling the user that the file is available for editing and giving them the option to Read-Write or cancel. How do I get rid of this box when the impport is complete?

I tried displayAlerts and it did not work. Thanks for any help you can provide.

Code:
Dim PathStr As String
Dim sPath As String
Dim sheet As String
Dim vDir As Variant


sPath = Forms!frmAgentImport!txtFile 'sPath must end with a back slash,
sheet = Forms!frmAgentImport!txtSheet

vDir = Dir(sPath & "*.*")
PathStr = Forms!frmAgentImport!txtFile

Set xlWB = xlApp.Workbooks.Open(sPath)

DoCmd.SetWarnings (WarningsOff)
DoCmd.RunSQL ("Delete * from tblPreviousYear")


DoCmd.TransferSpreadsheet acImport, 8, "tblPreviousYear", PathStr _
, True, sheet & "!"



Call ExcelQuit

aamirault is offline   Reply With Quote
Old 11-08-2005, 09:45 AM   #2
aamirault
Registered User
 
Join Date: Aug 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
aamirault is on a distinguished road
Workaround found

Hi All,

Thought I would post the Microsoft workaround for this isssue.

All you need to do is share the workbook and allow others to update the workbook.

Since this removes the exclusive lock Excel will not prompt you.

Hope this helps others.
aamirault is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Combo Box text required RickS Forms 9 04-11-2004 07:38 AM
How to set text box values with combo boxes etalent Forms 0 04-08-2004 05:21 AM
Update Combo Box from List Box Len Boorman Forms 7 02-19-2003 06:43 AM




All times are GMT -8. The time now is 12:04 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World