AlexanderCZ
November 25th, 2002, 09:34 AM
hi,i have problem with opening workbook in excel using VB7:
Public excapp As Excel.Application
Public workb As Excel.Workbook
Public Function OpenExcel() As Boolean
excapp = GetObject(, "Excel.Application")
str2 = "filename.xls"
str = System.IO.Path.GetFullPath(str2)
workb = excapp.Workbooks.Open(str)
End Function
i think that workb should be valid workbook,but it doesn't.some error occure described as"old format or invalid type library".
I am not vb programmer,so be patient with me...
thanks for reply
[Cakkie: Moved from VB to VB.Net forum]
Public excapp As Excel.Application
Public workb As Excel.Workbook
Public Function OpenExcel() As Boolean
excapp = GetObject(, "Excel.Application")
str2 = "filename.xls"
str = System.IO.Path.GetFullPath(str2)
workb = excapp.Workbooks.Open(str)
End Function
i think that workb should be valid workbook,but it doesn't.some error occure described as"old format or invalid type library".
I am not vb programmer,so be patient with me...
thanks for reply
[Cakkie: Moved from VB to VB.Net forum]