Hello guys

I have been trying to find a solution for this problem in the last 3
days.

I have a secured Access database. This db contains a Macro that i will
like to run from Excel. I need the code to run the Macro from Excel.
Any ideas?

Thanks in advance

Re: How to open a secured Access db from Excel by JP

JP
Fri Mar 14 17:31:43 CDT 2008

http://support.microsoft.com/kb/131921


On Mar 14, 6:18=A0pm, erick-flores <erickjflo...@gmail.com> wrote:
> Hello guys
>
> I have been trying to find a solution for this problem in the last 3
> days.
>
> I have a secured Access database. This db contains a Macro that i will
> like to run from Excel. I need the code to run the Macro from Excel.
> Any ideas?
>
> Thanks in advance


Re: How to open a secured Access db from Excel by erick-flores

erick-flores
Mon Mar 17 14:36:30 CDT 2008

Thanks for ur reply. But remenber I have a 'secured database'

I tried:
Private Sub Cmd_refresh_Click()
Shell ("C:\Program Files\Office97\Office\MSACCESS.EXE /excl /
NOSTARTUP /wrkgrp path_to_security.MDW path_to_database.mdb")
chan = DDEInitiate("MSACCESS", "system")
application.DDETerminate chan

And it looks like the Shell does not recognized with the .mdw option
on it. Any ideas how I can add the security file to the shell?

Re: How to open a secured Access db from Excel by JP

JP
Mon Mar 17 16:11:53 CDT 2008

You might get more help in the Access newsgroup. Sorry.

microsoft.=ADpublic.=ADaccess.=ADmodulesdaovba
microsoft.=ADpublic.=ADaccess.=ADexternaldata

ps- why are you using Shell to automate MS Access? You could
instantiate it directly from Excel (by setting a reference to the
Access object library) and then manipulate Access objects from Excel.

--JP

On Mar 17, 3:36=A0pm, erick-flores <erickjflo...@gmail.com> wrote:
> Thanks for ur reply. But remenber I have a 'secured database'
>
> I tried:
> Private Sub Cmd_refresh_Click()
> =A0 =A0Shell ("C:\Program Files\Office97\Office\MSACCESS.EXE =A0 /excl /
> NOSTARTUP /wrkgrp path_to_security.MDW path_to_database.mdb")
> =A0 =A0chan =3D DDEInitiate("MSACCESS", "system")
> =A0 =A0application.DDETerminate chan
>
> And it looks like the Shell does not recognized with the .mdw option
> on it. Any ideas how I can add the security file to the shell?


Re: How to open a secured Access db from Excel by erick-flores

erick-flores
Mon Mar 17 17:29:51 CDT 2008

On Mar 17, 4:11=A0pm, JP <jp2...@earthlink.net> wrote:
> You might get more help in the Access newsgroup. Sorry.
>
> microsoft.=ADpublic.=ADaccess.=ADmodulesdaovba
> microsoft.=ADpublic.=ADaccess.=ADexternaldata
>
> ps- =A0why are you using Shell to automate MS Access? You could
> instantiate it directly from Excel (by setting a reference to the
> Access object library) and then manipulate Access objects from Excel.
>
> --JP

Well...I tried to used the link that you gave me, which references in
using Shell. I have tried using the Access object libraries but I cant
get it to work. My problem is that the database is secured, when I use
my code against a non-secured database everything works fine.

Thanks anyways.

Re: How to open a secured Access db from Excel by JP

JP
Tue Mar 18 07:26:25 CDT 2008

Maybe this helps?

http://support.microsoft.com/kb/163002


--JP

On Mar 17, 6:29=A0pm, erick-flores <erickjflo...@gmail.com> wrote:
>
> Well...I tried to used the link that you gave me, which references in
> using Shell. I have tried using the Access object libraries but I cant
> get it to work. My problem is that the database is secured, when I use
> my code against a non-secured database everything works fine.
>
> Thanks anyways.


Re: How to open a secured Access db from Excel by erick-flores

erick-flores
Tue Mar 18 14:26:44 CDT 2008

> Maybe this helps?
>
> http://support.microsoft.com/kb/163002
>

I forgot to mentioned that my database has user-level security. I have
already looked at the link you gave me, but that one works with
secured database. If you read number 3 under the Summary section it
says:
"Open the database. Note that opening a secured Access database is
different from opening a database that is secured with the Microsoft
Access user-level security feature."
So this will not work for me. Sorry for my lack of information.

Anyways thanks for ur replies, if you still have any more links out
there please let me know...I am going crazy trying to figured this one
out.

Re: How to open a secured Access db from Excel by JP

JP
Tue Mar 18 15:53:23 CDT 2008

Sorry, my lack of familiarity with Access is showing. Again you might
want to post your query in the Access ngs:

microsoft.=ADpublic.=ADaccess.=ADmodulesdaovba
microsoft.=ADpublic.=ADaccess.=ADexternaldata


--JP

On Mar 18, 3:26=A0pm, erick-flores <erickjflo...@gmail.com> wrote:
> > Maybe this helps?
>
> >http://support.microsoft.com/kb/163002
>
> I forgot to mentioned that my database has user-level security. I have
> already looked at the link you gave me, but that one works with
> secured database. If you read number 3 under the Summary section it
> says:
> "Open the database. Note that opening a secured Access database is
> different from opening a database that is secured with the Microsoft
> Access user-level security feature."
> So this will not work for me. Sorry for my lack of information.
>
> Anyways thanks for ur replies, if you still have any more links out
> there please let me know...I am going crazy trying to figured this one
> out.


Re: How to open a secured Access db from Excel by erick-flores

erick-flores
Wed Mar 19 13:51:06 CDT 2008

No prob. Thanks for ur help