Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Close Excel through Excel VBA 2

Status
Not open for further replies.

Wootoid

Technical User
Jul 26, 2008
28
0
0
US
I seem to be having an issue with an Excel file that is linked into an Access database. When I open the Excel file and the corresponding Access table, and close either or both down, Excel persists in memory, and errors out next time the Excel file is opened.

The Excel file needs to be opened when I run a query from the linked table as the Excel file queries up to date data from a different database program and brings it directly into a table in Access. This is when it decides to not go away when Excel is shut down by simply exiting the program.

I need a way to remove the instance of Excel when the Excel file is closed(preferrably from within Excel VBA if possible.). I have tried a few methods, but really I need to just be pushed in the right direction.

Aren
 
the Excel file queries up to date data from a different database program and brings it directly into a table in Access
Why not query the up to date data directly from access ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I have never tried querying Oracle from Access. I have added a linked table, but that brought in more info than I wanted my users to see, and they are supposed to be able to see the tables. The only way I can think of doing that would be through vba, but that seems to have a character limit for the sql, which has caused problems for me in the past.

I am somewhat new to this, so if there is a way to query Oracle from Access I would love to know how or simply pushed in the right direction.

Aren
 
How does Excel get the Oracle's data ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I run that through Microsoft Query, and now that I say that is there a way to use that in Access?

Aren
 
more info than I wanted my users to see
Lint the Oracle table with a local name starting with uSys

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I have only used the wizard to create the links, would this be in the VBA that your talking about. I am really not sure how to do what you just mentioned.

Aren
 
Use the wizard and then rename the table in the database window if you don't know how to do it with the wizard.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
OK, I really must have just misread that, the uSys was to hide the table and that was it I assume. I am very tired at this point so please excuse my lack of understanding. I can work with this thank you.

Aren
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top