Hello

Thanks for your answering to me. But I have one more question for that how can I input data to the file existing in Excel using vb 6.0?
Something like that:
objectname = GetObject("C:\Pathname.xls")
before I have run some times , and always got failed that indicates that can't find the file name or class name during Automation.
for example:

dim objExcel as object
public sub command1_click()
set objExcel = GetObject("C:\Documents and Settings\Administrator\My Documents\book1.xls")
objExcel.Application.visible=true
objExcel.Parent.Windows(1).visible=true
objExcel.Application.windostate=1

set objExcel=nothing

End Sub

Could you show me the correct answer? Thanks.

Regards
Caribouca