Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Open a ms project file from excel using vba?

'Most of this from a post by Rob Bruce - public.excel.programming - 05/26/2005...

'If you use the shellexecute API you don't need to know anything about the app.
'(just the file path and file, as the API determines the program to use - JBC)
'-------------------------
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _
ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

'Calls the other sub
Sub OpenMyFile()
OpenFileInDefaultApp "C:\Program Files\Microsoft Office\Office\Library\MyFile.prj"
End Sub


Sub OpenFileInDefaultApp(FullName As String)
ShellExecute 0, vbNullString, FullName, 0&, 0&, 1
End Sub
--------------
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Moto34"

wrote in message
Does anyone know what syntax to use to open an existing Microsoft Project
file from within Excel? I am wanting to have the user be entering data into
Excel and then have VBA run to open a MS Project file which will then get the
data from excel and manipulate it from there. Everything works except for
having VBA in excel open a specific ms project file at a specific location.
Please help.
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
i have an excel file which i badly need for my project. the probl jan Excel Discussion (Misc queries) 2 March 5th 07 04:40 AM
In Excel - Use Windows Explorer instead of File Open to open file KymY Excel Discussion (Misc queries) 1 August 5th 06 09:59 PM
VBA Project still on the list despite the Excel File closed BL Excel Programming 1 May 1st 06 10:16 PM
With VBA from Excel: Open Project, extract resource list and copy it to a worksheet, close project. Tony Excel Programming 1 October 18th 05 03:53 PM
Assigning the Help 4, *.HLP file for a project programmatically in a protected Project Tony Seiscons Excel Programming 0 October 4th 04 03:10 PM


All times are GMT +1. The time now is 06:29 AM.

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

About Us

"It's about Microsoft Excel"