HI LJMetzger
well I went to the link, I'm a newbie at this, but I tried figuring out how to make that code work
with no luck, the path to my file I would like to open is "C:\Users\RAM\Desktop\TEST\CHARTB.xlsm.
below is the code I tried to use, could you possibly put the path in the right spots for me
.
Private Sub CommandButton1_Click()
Sub OpenNewWorkbookInNewInstanceOfExcel(sPath As String, sFileName As String)
'Adapted from Andy Pope circa 2003 - Thank you again, Andy.
'http://www.ozgrid.com/forum/showthread.php?t=16893
'
'It it the calling routine's responsibility to make sure that:
'a. The Excel file to be opened exists
'b. The Excel file is not already open
Dim xlApp As Application
Dim xlBook As Workbook
Dim sPathAndFileName As String
'Create the Path and File Name for the Workbook
sPathAndFileName = ("C:\Users\RAM\Desktop\TEST\CHARTB.xlsm")
'Open a new Instance of Excel and make it visible
Set xlApp = New Excel.Application
xlApp.Visible = True
'Open the File in the new instance of Excel
Set xlBook = xlApp.Workbooks.Open(sPathAndFileName)
'Clear the objects
Set xlApp = Nothing
Set xlBook = Nothing
End Sub
THANKS
Keith
Bookmarks