Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 25
Default Need Macro to Open Access

I need help with 2 Macros. The first sample opens Access, but does not show
the menu on the right where you can choose a blank database or a previous
completed database. The sample I show below is where I tried to convert a
Macro that opens a blank Word Document.


Sub NewAccessOnly()
Dim oAccessApp As Object
Set oAccessApp = CreateObject("Access.Application")
oAccessApp.Visible = True
oAccessApp.Documents.Add DocumentType:=wdNewBlankDocument
End Sub


The next sample is again where I have tried to modify an existing Macro that
opens a actual Word Document. Naturally, it doesn't work either.

Sub NewAccessWithDocument()
Dim oAccessApp As Object
Dim oAccessDoc As Object

Set oAccessApp = CreateObject("Access.Application")
oAccessApp.Visible = True
Set oAccessDoc = oWordApp.Documents.Open( _
"C:\documents and settings\default\my documents\AVPDatabaseSample.mdb")

End Sub

I'm not a strong programmer, but this looks like the last step to be
completed in my project.

I would appreciate any help with these 2 Macros.

Thanks in Advance
Matt@Launchnet

--
Please take a look at www.openoursite.com Click on: "Keywords" and then
Click on "Matt's Story" and if you are a man, you should be very happy that
you read my story. God Bless for everyones help.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default Need Macro to Open Access

Sub openAccess()

Shell "C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE"
End Sub

"Launchnet" wrote:

I need help with 2 Macros. The first sample opens Access, but does not show
the menu on the right where you can choose a blank database or a previous
completed database. The sample I show below is where I tried to convert a
Macro that opens a blank Word Document.


Sub NewAccessOnly()
Dim oAccessApp As Object
Set oAccessApp = CreateObject("Access.Application")
oAccessApp.Visible = True
oAccessApp.Documents.Add DocumentType:=wdNewBlankDocument
End Sub


The next sample is again where I have tried to modify an existing Macro that
opens a actual Word Document. Naturally, it doesn't work either.

Sub NewAccessWithDocument()
Dim oAccessApp As Object
Dim oAccessDoc As Object

Set oAccessApp = CreateObject("Access.Application")
oAccessApp.Visible = True
Set oAccessDoc = oWordApp.Documents.Open( _
"C:\documents and settings\default\my documents\AVPDatabaseSample.mdb")

End Sub

I'm not a strong programmer, but this looks like the last step to be
completed in my project.

I would appreciate any help with these 2 Macros.

Thanks in Advance
Matt@Launchnet

--
Please take a look at www.openoursite.com Click on: "Keywords" and then
Click on "Matt's Story" and if you are a man, you should be very happy that
you read my story. God Bless for everyones help.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 47
Default Need Macro to Open Access

Thanks Mike . . . Access opens fine, but the operator needs to click on the
bottom tab in order to display it. It is hidden behind the Excel Workbook
that it is being Launched from. Isn't there some way to display it like it
does in Word ?

Secondly, I still need another Macro that will open the actual
"AVPDatabaseSample.mdb" and display it.

Many thanks Mike

Matt@Launchnet



Mike wrote:
Sub openAccess()

Shell "C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE"
End Sub

I need help with 2 Macros. The first sample opens Access, but does not show
the menu on the right where you can choose a blank database or a previous

[quoted text clipped - 29 lines]
Thanks in Advance
Matt@Launchnet


--
Please take a look at www.openoursite.com Click on: "Keywords" and then
Click on "Matt's Story" and if you are a man, you should be very happy that
you read my story. God Bless for everyones help.

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200706/1

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 52
Default Need Macro to Open Access

http://techonthenet.com/excel/macros/open_access.php

MH

"Launchnet" <u20911@uwe wrote in message news:73e71f78d029b@uwe...
I need help with 2 Macros. The first sample opens Access, but does not
show
the menu on the right where you can choose a blank database or a previous
completed database. The sample I show below is where I tried to convert a
Macro that opens a blank Word Document.


Sub NewAccessOnly()
Dim oAccessApp As Object
Set oAccessApp = CreateObject("Access.Application")
oAccessApp.Visible = True
oAccessApp.Documents.Add DocumentType:=wdNewBlankDocument
End Sub


The next sample is again where I have tried to modify an existing Macro
that
opens a actual Word Document. Naturally, it doesn't work either.

Sub NewAccessWithDocument()
Dim oAccessApp As Object
Dim oAccessDoc As Object

Set oAccessApp = CreateObject("Access.Application")
oAccessApp.Visible = True
Set oAccessDoc = oWordApp.Documents.Open( _
"C:\documents and settings\default\my documents\AVPDatabaseSample.mdb")

End Sub

I'm not a strong programmer, but this looks like the last step to be
completed in my project.

I would appreciate any help with these 2 Macros.

Thanks in Advance
Matt@Launchnet

--
Please take a look at www.openoursite.com Click on: "Keywords" and then
Click on "Matt's Story" and if you are a man, you should be very happy
that
you read my story. God Bless for everyones help.



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 47
Default Need Macro to Open Access

Hi MH (Mike ?)
I went to your suggested site and got Access to open the database I wanted it
to. Thanks Much.

I still have a problem with opening just Access and having it displayed. I
have to click on the bottom tab to view Access. The Macro does open Access,
but I want it displayed automatically.

My code is:

Sub NewAccessOnly()
Shell "C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE"
End Sub

What can I add to have it displayed automatically ?
Thanks Again.

Matt@Launchnet

- - - - - - - - - - - - - - - - - - - - - - - - - - -

MH wrote:
http://techonthenet.com/excel/macros/open_access.php

MH

I need help with 2 Macros. The first sample opens Access, but does not
show

[quoted text clipped - 31 lines]
Thanks in Advance
Matt@Launchnet


--
Please take a look at www.openoursite.com Click on: "Keywords" and then
Click on "Matt's Story" and if you are a man, you should be very happy that
you read my story. God Bless for everyones help.

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200706/1



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 47
Default Need Macro to Open Access

More info on my current problem where I have to click on the bottom tab to
view it.
The problem I forgot to mention, is that 2 instances of Access are opened and
I only want 1.
Sorry I forgot.

Matt@Launchnet

- - - - - - - - - - - - - - - - -

Launchnet wrote:
Hi MH (Mike ?)
I went to your suggested site and got Access to open the database I wanted it
to. Thanks Much.

I still have a problem with opening just Access and having it displayed. I
have to click on the bottom tab to view Access. The Macro does open Access,
but I want it displayed automatically.

My code is:

Sub NewAccessOnly()
Shell "C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE"
End Sub

What can I add to have it displayed automatically ?
Thanks Again.

Matt@Launchnet

- - - - - - - - - - - - - - - - - - - - - - - - - - -

http://techonthenet.com/excel/macros/open_access.php

[quoted text clipped - 5 lines]
Thanks in Advance
Matt@Launchnet



--
Please take a look at www.openoursite.com Click on: "Keywords" and then
Click on "Matt's Story" and if you are a man, you should be very happy that
you read my story. God Bless for everyones help.

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200706/1

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 52
Default Need Macro to Open Access

You may find that this works better:

ActiveWorkbook.FollowHyperlink Address:="F:\My Documents\MyDatabase.mdb"

I'm still unsure as to what you expect this to do, if this is insufficient
please post a full explanation of what you expect to happen.

MH

"Launchnet via OfficeKB.com" <u20911@uwe wrote in message
news:73f64685b945e@uwe...
More info on my current problem where I have to click on the bottom tab to
view it.
The problem I forgot to mention, is that 2 instances of Access are opened
and
I only want 1.
Sorry I forgot.

Matt@Launchnet

- - - - - - - - - - - - - - - - -

Launchnet wrote:
Hi MH (Mike ?)
I went to your suggested site and got Access to open the database I wanted
it
to. Thanks Much.

I still have a problem with opening just Access and having it displayed.
I
have to click on the bottom tab to view Access. The Macro does open
Access,
but I want it displayed automatically.

My code is:

Sub NewAccessOnly()
Shell "C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE"
End Sub

What can I add to have it displayed automatically ?
Thanks Again.

Matt@Launchnet

- - - - - - - - - - - - - - - - - - - - - - - - - - -

http://techonthenet.com/excel/macros/open_access.php

[quoted text clipped - 5 lines]
Thanks in Advance
Matt@Launchnet



--
Please take a look at www.openoursite.com Click on: "Keywords" and then
Click on "Matt's Story" and if you are a man, you should be very happy
that
you read my story. God Bless for everyones help.

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200706/1



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 47
Default Need Macro to Open Access

Good Morning MH . . .

Thanks for the latest macro.

What I still need help with is on the following macro. It works, but Access
is displayed behind Excel, which is where I clicked on the Macro. I do not
want a database opened.

I just need Access to be displayed in front of Excel, not behind.

ACTUAL CODE:

Sub NewAccessOnly()
Shell "C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE"
End Sub

Maybe there is a better way ?

GRATITUDE:
I really appreciate the help you and others have given me. It truly is very
appreciated.

FUTU
The last macro I will need help with ( I hope it is the last ) is to have a
Macro that will open Windows Explorer at the top of the tree, which I mean
the same display as when you open Windows Explorer directly, or manually.

PURPOSE:
You asked for more detail on why I am requesting these Macros. Well, I have
developed a menu system for my customers, which they love by the way, and
these are additions that have been requested. The menu has 20 links out to
20 pages in the workbook. Additionally, I have unlimited links to any Word,
Excel, or Access documents that the user may have. I also have standard
links out to sites such as Hotmail, which I use, Juno eMail, which I use,
Google, Yahoo, MSN, and various help forums and learning sites.

I think this is the best that I can describe it. I'll be glad to answer any
questions you may have.

Many Thanks Again

Matt@Launchnet

MH wrote:
You may find that this works better:

ActiveWorkbook.FollowHyperlink Address:="F:\My Documents\MyDatabase.mdb"

I'm still unsure as to what you expect this to do, if this is insufficient
please post a full explanation of what you expect to happen.

MH

More info on my current problem where I have to click on the bottom tab to
view it.

[quoted text clipped - 36 lines]
Thanks in Advance
Matt@Launchnet


--
Please take a look at www.openoursite.com Click on: "Keywords" and then
Click on "Matt's Story" and if you are a man, you should be very happy that
you read my story. God Bless for everyones help.

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200706/1

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 52
Default Need Macro to Open Access

Try this:

Sub NewAccessOnly()
Shell "C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE",
vbNormalFocus
End Sub

And for windows explorer:

Sub NewExplorerOnly()
Shell "C:\WINDOWS\Explorer.exe /e,/select,c:\", vbNormalFocus
End Sub

MH

"Launchnet via OfficeKB.com" <u20911@uwe wrote in message
news:7409b5db224c5@uwe...
Good Morning MH . . .

Thanks for the latest macro.

What I still need help with is on the following macro. It works, but
Access
is displayed behind Excel, which is where I clicked on the Macro. I do
not
want a database opened.

I just need Access to be displayed in front of Excel, not behind.

ACTUAL CODE:

Sub NewAccessOnly()
Shell "C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE"
End Sub

Maybe there is a better way ?

GRATITUDE:
I really appreciate the help you and others have given me. It truly is
very
appreciated.

FUTU
The last macro I will need help with ( I hope it is the last ) is to have
a
Macro that will open Windows Explorer at the top of the tree, which I mean
the same display as when you open Windows Explorer directly, or manually.

PURPOSE:
You asked for more detail on why I am requesting these Macros. Well, I
have
developed a menu system for my customers, which they love by the way, and
these are additions that have been requested. The menu has 20 links out
to
20 pages in the workbook. Additionally, I have unlimited links to any
Word,
Excel, or Access documents that the user may have. I also have standard
links out to sites such as Hotmail, which I use, Juno eMail, which I use,
Google, Yahoo, MSN, and various help forums and learning sites.

I think this is the best that I can describe it. I'll be glad to answer
any
questions you may have.

Many Thanks Again

Matt@Launchnet

MH wrote:
You may find that this works better:

ActiveWorkbook.FollowHyperlink Address:="F:\My Documents\MyDatabase.mdb"

I'm still unsure as to what you expect this to do, if this is insufficient
please post a full explanation of what you expect to happen.

MH

More info on my current problem where I have to click on the bottom tab
to
view it.

[quoted text clipped - 36 lines]
Thanks in Advance
Matt@Launchnet


--
Please take a look at www.openoursite.com Click on: "Keywords" and then
Click on "Matt's Story" and if you are a man, you should be very happy
that
you read my story. God Bless for everyones help.

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200706/1



  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 47
Default Need Macro to Open Access

Good Morning Again . . .

Both work and I thank you very much.
Have a Great Day.

Matt@Launchnet


MH wrote:
Try this:

Sub NewAccessOnly()
Shell "C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE",
vbNormalFocus
End Sub

And for windows explorer:

Sub NewExplorerOnly()
Shell "C:\WINDOWS\Explorer.exe /e,/select,c:\", vbNormalFocus
End Sub

MH

Good Morning MH . . .

[quoted text clipped - 62 lines]
Thanks in Advance
Matt@Launchnet


--
Please take a look at www.openoursite.com Click on: "Keywords" and then
Click on "Matt's Story" and if you are a man, you should be very happy that
you read my story. God Bless for everyones help.

Message posted via http://www.officekb.com

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
Macro Password to open or access Param Excel Worksheet Functions 0 March 6th 06 04:24 PM
Open Access Database with VBA Bubba Excel Discussion (Misc queries) 1 July 19th 05 10:53 PM
Open Access Database with VBA Keith Excel Discussion (Misc queries) 1 June 1st 05 07:18 PM
Excel cannot open Access MDB Neva Excel Discussion (Misc queries) 0 April 4th 05 08:35 PM
Open Access Database under and Excel window using a Macro BMSpell Excel Worksheet Functions 1 January 8th 05 05:32 PM


All times are GMT +1. The time now is 05:52 AM.

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

About Us

"It's about Microsoft Excel"