I am trying to import an excel file (office 2010) to microsoft project. When I do this manually it works fine (to confirm that the excel file is not corrupt). However, when I import it using macros (on launch of the MPP file) in MS Project, I get an error "Runtime error '1004'. Below is the code that I tried to execute from the MSProject.
Private Sub Project_Open(ByVal pj As Project)
Dim strFilepath As String
'strFilepath = "C:\Temp\ExcelSrc.xlsx"
FileOpenEx Name:=strFilepath, ReadOnly:=False, Merge:=0, FormatID:="MSProject.ACE.14", map:="ExistingMap-ExcelSrc"
End Sub
I tried google but I found solutions related to excel VBA runtime error '1004' but not related to MS Project runtime error'1004'
Any help is greatly appreciated...Thanks in advance!, Ajx