Hello,
I have a problem with my program. I have a code as follow:
Code:
Dim Ex As New Excel.Application
Dim aa As Excel.Workbook
Dim ws As Excel.Worksheet
Set aa = Ex.Workbooks.Add
aa.SaveAs ("C:\Hong.xls")
Set ws = aa.Sheets(1)
    Cells(1, 1) = Time
    For i = 2 To 24
        Cells(1, i) = i
    Next
aa.Save
 aa.Close: Set aa = Nothing: Set Ex = Nothing
I wrote it on my computer, use VB6.0 and Office 2003. So I used reference: "Excel 11.0 Object Library". The program run perfectly on my computer.
But I want to use it with another computer which couldn't install Office. So I copied Office 97 (it can run instantly) to the computer and use reference: "Excel 8.0 Object Library". And the program always get error "loading DLL" at" "Set aa=Ex.Workbooks.Add"
I don't know how to solve this problem.
Please help me!
Thank you very much.