![]() |
|
|
|
#1
|
|||
|
|||
|
Hi All
I am struggling to find a piece of vba code that I can use in a MSP Project Module to open MS Excel together with a pre-defined spreadsheet. Can anyone help. Thanks in anticipation. Tony |
|
#2
|
||||
|
||||
|
Hi,
Here's a starting point: Code:
Sub foo()
Dim xlApp As Object
Dim xlWkb As Object
Set xlApp = CreateObject("Excel.Application")
Set xlWkb = xlApp.Workbooks.Open("C:\YourfilePathandName.xls")
xlApp.Visible = True
Set xlWkb = Nothing
Set xlApp = Nothing
End Sub
|
|
#3
|
|||
|
|||
|
Hi Colin
This is excellent. Many thanks. Tony |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Microsoft Project 2010 taking up to 10mins to open file from network share.
|
BITS | Project | 1 | 06-01-2011 09:37 AM |
| VB code from one document runs on other open documents | beav_35 | Word VBA | 0 | 11-10-2010 02:52 PM |
Any tutorial same as to this excel sheet with code?
|
Learner7 | Excel | 1 | 05-18-2010 05:31 PM |
VB Code in Excel Active worksheet
|
shakilhyd | Excel | 2 | 05-17-2010 07:50 AM |