Hi,
I have 2 forms in an access database (access 2007-10). I am trying to delete these forms using vba in an excel workbook.
My access database has NO database password but the VBA project in access HAS a password. In the access database I have created a sub procedure (named DeleteAll) which contains the following code for each form.
When I call this code from my excel vba, the Access database gives me an error -
Funny thing is if I were to delete a query using this method, it gets deleted easily. I am experiencing this problem with forms only. Please help.</formname>
I have 2 forms in an access database (access 2007-10). I am trying to delete these forms using vba in an excel workbook.
My access database has NO database password but the VBA project in access HAS a password. In the access database I have created a sub procedure (named DeleteAll) which contains the following code for each form.
Code:
Docmd.DeleteObject acform, <formname>
When I call this code from my excel vba, the Access database gives me an error -
Run-time error '2017': Microsoft helps protect this Visual Basic for Applications Project with a password. You must supply the password in the Visual Basic Editor before you can perform this operation.
Funny thing is if I were to delete a query using this method, it gets deleted easily. I am experiencing this problem with forms only. Please help.</formname>