Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
OpenDatabase recommended practise
I have an excel spreadsheet that accesses a database with the following typical sequence Set db = OpenDatabase(Range("dbFullName").Value) 'opens the database Set rst = db.OpenRecordset("Statements") 'opens the Table 'read, edit or add records rst.Close db.Close Now it happens from time to time that I get an error message "file locked for editing". From some internet research I have checked the properties of the file or folder and I see it is not "read only", which has been the normal published problem. Other times I get a message that the database/recordset is already open. My question is: Should one open the database on opening of the Excel workbook and rather leave it open until you close the workbook, or should you open and close the db and rst everytime you access the database. Many thanks Laurence |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
OpenDatabase Error | Excel Programming | |||
Practise files in Excel 2007? | New Users to Excel | |||
Best practise XLA add-in | Excel Programming | |||
OpenDatabase-Problem | Excel Programming | |||
Dao.OpenDatabase gives me error when ... | Excel Programming |