Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-23-2011, 09:52 AM
OTPM OTPM is offline VBA Code in Project to Wake Up/Open Excel Windows 7 32bit VBA Code in Project to Wake Up/Open Excel Office 2010 32bit
Expert
VBA Code in Project to Wake Up/Open Excel
 
Join Date: Apr 2011
Location: West Midlands
Posts: 981
OTPM is on a distinguished road
Default VBA Code in Project to Wake Up/Open Excel

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
Reply With Quote
  #2  
Old 05-23-2011, 11:15 AM
Colin Legg's Avatar
Colin Legg Colin Legg is offline VBA Code in Project to Wake Up/Open Excel Windows 7 32bit VBA Code in Project to Wake Up/Open Excel Office 2010 32bit
Expert
 
Join Date: Jan 2011
Location: UK
Posts: 369
Colin Legg will become famous soon enough
Default

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
Reply With Quote
  #3  
Old 05-23-2011, 02:24 PM
OTPM OTPM is offline VBA Code in Project to Wake Up/Open Excel Windows 7 32bit VBA Code in Project to Wake Up/Open Excel Office 2010 32bit
Expert
VBA Code in Project to Wake Up/Open Excel
 
Join Date: Apr 2011
Location: West Midlands
Posts: 981
OTPM is on a distinguished road
Default

Hi Colin
This is excellent.
Many thanks.
Tony
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA Code in Project to Wake Up/Open Excel 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
VBA Code in Project to Wake Up/Open Excel Any tutorial same as to this excel sheet with code? Learner7 Excel 1 05-18-2010 05:31 PM
VBA Code in Project to Wake Up/Open Excel VB Code in Excel Active worksheet shakilhyd Excel 2 05-17-2010 07:50 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:21 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft