In VBA, I'm trying to open a .csv file and SaveAs a .xls file. It will work with early binding, but I have to use late binding due to different versions in use here. The following code will work up to the SaveAs line. Then I get an error #1004, "...Programmatic access to Visual Basic Project is not trusted."
Any suggestions as to what I need to change are welcome...
Public objExcel As Object
Set objExcel = CreateObject("Excel.Application")
objExcel.Workbooks.Open strpath
With objExcel
.Visible = True
.DisplayAlerts = False
.ActiveWorkbook.SaveAs strpathNew, xlNormal
End With
budbeth
Any suggestions as to what I need to change are welcome...
Public objExcel As Object
Set objExcel = CreateObject("Excel.Application")
objExcel.Workbooks.Open strpath
With objExcel
.Visible = True
.DisplayAlerts = False
.ActiveWorkbook.SaveAs strpathNew, xlNormal
End With
budbeth