PDA

Click to See Complete Forum and Search --> : Urgent need to help (resolved)


caribouca
Sep 25th, 2003, 12:26 AM
Why does it can't find the pathname? something like that:

Dim objExcel as object
Public sub command1_Clikc()
set objExcel=GetObject("C:\Documents and Settings\Administrator\My Documets\ledger.xls")
objExcel.application.visible=true
objExcel.Parent.Windows(1).Visible = True
objExcel.Application.WindowState = 1

Set objExcel = Nothing

End Sub
Please correct it for me. Thanks.

MileOut
Sep 25th, 2003, 03:20 AM
It can't find the pathname because you can't spell Documents. ;)

I think, although I might be wrong, that there's a special syntax for folders with spaces in their names.

Also, why do you have an ampersand (&) in the path? Is your spreadsheet file really called: & book1.xls?