RUN-TIME ERROR 438
Private Command1_Click()
Private Linha As Integer
Dim exclApp As Object
Dim exclBook As Object
Dim exclSheet As Object
Set exclApp = GetObject("C:\Meus Documentos\Teste.xls")
Set exclBook = exclApp.WorkBooks.Add
Set exclSheet = exclApp.ActiveWorkBook.ActiveSheet
End Sub
Run-Time error '438':
Object doesn't support this property or method
Gostaria de saber porque essa mensagem de erro para a linha abaixo:
Set exclBook = exclApp.WorkBooks.Add
OBS: Quero abrir um arquivo já existente e não cria-lo
Desde já agradeço a atenção
Private Linha As Integer
Dim exclApp As Object
Dim exclBook As Object
Dim exclSheet As Object
Set exclApp = GetObject("C:\Meus Documentos\Teste.xls")
Set exclBook = exclApp.WorkBooks.Add
Set exclSheet = exclApp.ActiveWorkBook.ActiveSheet
End Sub
Run-Time error '438':
Object doesn't support this property or method
Gostaria de saber porque essa mensagem de erro para a linha abaixo:
Set exclBook = exclApp.WorkBooks.Add
OBS: Quero abrir um arquivo já existente e não cria-lo
Desde já agradeço a atenção
De acordo com o Help do VB5 q eu desenterri aki (nem lembrava q eu tinha ele...):
Ou seja,a grosso modo, a propriedade 'WorkBooks.Add' do objeto 'exclApp' não
existe...
Not all objects support all properties and methods. This error has the following cause and solution:
·You specified a method or property that doesn't exist for this Automation object.See the object's documentation for more information on the object and check the spellings of properties and methods.
·You specified a Friend procedure to be called late bound.
The name of a Friend procedure must be known at compile time. It can't appear in a late-bound call.
Ou seja,a grosso modo, a propriedade 'WorkBooks.Add' do objeto 'exclApp' não
existe...
Tópico encerrado , respostas não são mais permitidas