excel 2010 (window 7)

dollygg

New Member
Joined
Jul 21, 2010
Messages
46
Hello ,

I am getting an error when testing the macro in Window 7.

My excel VBA macro created a tempdao.xlsm file on destop but the macro is not able to find it eventhough the file is there. It get stuck on this line of code:


Set db= open database("c:\tempdao.xlsm, false, true, "Excel 12.0;HDR=YES;")

No one in our team is able to figure it out. It has something to do with the new version of Excel and window 7.
 

Some videos you may like

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

dragontooth

New Member
Joined
Mar 3, 2008
Messages
29
It appears as if the open database statement is looking at the root of C: instead of your desktop.
 

JoeMo

MrExcel MVP
Joined
May 26, 2009
Messages
17,391
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Excel 2010 is version 14 I think.
 

dollygg

New Member
Joined
Jul 21, 2010
Messages
46

ADVERTISEMENT

Hello,

I am still getting the same error .

The error message is :

The Microsoft Jet database engine cannot open the file "c:\Users\qguan\desktop".It's already opened exclusively by another user, or you need permission to view its data.



<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p><o:p></o:p>
 

JoeMo

MrExcel MVP
Joined
May 26, 2009
Messages
17,391
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
I assume you have tried closing Excel and rebooting, etc. Other than that I have no idea how to help you.
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
36,166
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS

ADVERTISEMENT

Is the workbook password protected? Which version of DAO are you using?
 

dragontooth

New Member
Joined
Mar 3, 2008
Messages
29
There may be a hidden file that locks the "database" file for exclusive use. If the application terminated suddenly this file will be left behind, if rebooting doesn't do it as already suggested you may need to try to find this "lock" file and delete it.
 

dollygg

New Member
Joined
Jul 21, 2010
Messages
46
I will delete any temp file manually tomorrow and do the testing again.

We are using Microsoft DAO 3.6 Object library.
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
36,166
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
3.6 won't know anything about the new formats so I think you'll need to change that to use the new MS Access Database Engine object library
 

Watch MrExcel Video

Forum statistics

Threads
1,123,480
Messages
5,601,911
Members
414,482
Latest member
morkar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top