By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,486 Members | 2,124 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,486 IT Pros & Developers. It's quick & easy.

working with excell from access code

P: n/a
I need to open an excel workbook and import info to my access program.
That isn't the problem, I've got the code down for doing what I want
to do. I'm declaring the variable and setting it like this.

Dim objEx As Object

Set objEx = CreateObject("Excel.Application")

My problem is after I'm done and exit the access code module and I
shut the excel file down like this

Set objEx = Nothing

whenever I want to open the file in excel it comes back with the
"Read-Only" box, saying the file is being modified by me and to either
click "read-only" or "notify"

How do I shut down my access use of the excel file without leaving it
as a read-only file. (What did I do - or not do - to reset the excel
file back to normal, or was it something I did or not do when I opened
the file).

Thanks for your help
Rocky
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Take a look at the sample code in
http://www.mvps.org/access/modules/mdl0006.htm at "The Access Web".

The important thing is to Close the Workbook object (with or without saving)

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"Rocky A" <ro***@graphictrends.net> wrote in message
news:ed**************************@posting.google.c om...
I need to open an excel workbook and import info to my access program.
That isn't the problem, I've got the code down for doing what I want
to do. I'm declaring the variable and setting it like this.

Dim objEx As Object

Set objEx = CreateObject("Excel.Application")

My problem is after I'm done and exit the access code module and I
shut the excel file down like this

Set objEx = Nothing

whenever I want to open the file in excel it comes back with the
"Read-Only" box, saying the file is being modified by me and to either
click "read-only" or "notify"

How do I shut down my access use of the excel file without leaving it
as a read-only file. (What did I do - or not do - to reset the excel
file back to normal, or was it something I did or not do when I opened
the file).

Thanks for your help
Rocky

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.