#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Open files

Hey,

I have a spreadsheet that has a list of files in it that I test to see if
it is open and if not I open the file. Then on to the next one. The problem
is that I now need to add a database to the list.

I want to parse the list and if the file is a xls:
Open it if not already
& if a mdb open it if not already...

Is there a way to test if a mdb file is open from within excel? and how do
I open the file from within excel?

Ernst.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Open files

Ernst,
By "mdb file is open", do you mean "Is any other user accessing the data " ?

The Excel concept of "Open" does not really apply to Access databases. What
are you trying to achieve ?

NickHK

"Ernst Guckel" wrote in message
...
Hey,

I have a spreadsheet that has a list of files in it that I test to see

if
it is open and if not I open the file. Then on to the next one. The

problem
is that I now need to add a database to the list.

I want to parse the list and if the file is a xls:
Open it if not already
& if a mdb open it if not already...

Is there a way to test if a mdb file is open from within excel? and how

do
I open the file from within excel?

Ernst.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Open files

All I'm trying to do is allow users to open all of their daily files in a
single click.

"NickHK" wrote:

Ernst,
By "mdb file is open", do you mean "Is any other user accessing the data " ?


No. The access GUI to open the file.

Ernst.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Open files

Ernst,
How are you currently doing this with the Excel files ?

NickHK

"Ernst Guckel" wrote in message
...
Hey,

I have a spreadsheet that has a list of files in it that I test to see

if
it is open and if not I open the file. Then on to the next one. The

problem
is that I now need to add a database to the list.

I want to parse the list and if the file is a xls:
Open it if not already
& if a mdb open it if not already...

Is there a way to test if a mdb file is open from within excel? and how

do
I open the file from within excel?

Ernst.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Open files

Like this... Command button calls DailyFiles

Sub DailyFiles()
Application.StatusBar = False
'Get list of Daily Files and make sure that the're open
Dim List As Object
For Each List In Worksheets("Data Sheet").Range("DailyFiles")
IsOpen List.Value
Next
ThisWorkbook.Close
End Sub

Function IsOpen(wbname As String)

' Is Open Function

On Error Resume Next

Dim Active

Active = ActiveWorkbook.Name
If wbname = "" Then Exit Function
wbname = wbname & ".xls"
'Check to see if Workbook is Open
Dim wb As Workbook, wbs As Workbooks
For Each wb In Application.Workbooks
If wb.Name = wbname Then

'If Workbook is open Exit function
Exit Function

End If

Next wb
'Open Workbook
Workbooks.Open Filename:=ActiveWorkbook.Path & "\" & wbname
ActiveWorkbook.RunAutoMacros xlAutoOpen
'Activate calling workbook
Windows(Active).Activate
End Function


"NickHK" wrote:

Ernst,
How are you currently doing this with the Excel files ?

NickHK

"Ernst Guckel" wrote in message
...
Hey,

I have a spreadsheet that has a list of files in it that I test to see

if
it is open and if not I open the file. Then on to the next one. The

problem
is that I now need to add a database to the list.

I want to parse the list and if the file is a xls:
Open it if not already
& if a mdb open it if not already...

Is there a way to test if a mdb file is open from within excel? and how

do
I open the file from within excel?

Ernst.






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
emailing files from excel, the files will not go until I open up . joe New Users to Excel 2 September 18th 09 02:12 PM
how do I toggle between 2 open excel files and leave both open Big D in Brighton Excel Discussion (Misc queries) 1 November 6th 08 04:28 PM
How to change default Open/Files of Type to "Microsoft Excel Files Tammy Excel Discussion (Misc queries) 2 January 14th 08 11:06 PM
I cant open files unless I open the Excel program first ElaineAng Excel Discussion (Misc queries) 3 February 16th 06 02:54 PM
file open via IE hyperlink causes already open files to shrink and tile Marc Setting up and Configuration of Excel 0 May 4th 05 08:13 PM


All times are GMT +1. The time now is 12:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"