Problem with CUSTOMDOCUMENTPROPERTIES

D

David Di Donato

hallo zusammen

i have the following problem.

*******
Function xTest()

Dim xlApp As Excel.Application
Dim xlWbk As Excel.Workbook

Set xlWbk = GetObject("", "Excel.Sheet")
Set xlApp = xlWbk.Application
xlApp.Workbooks.Open ("C:\SP5Inst\EPP\Vorlagen\D_Standard")

xlWbk.CustomDocumentProperties("SP5DB").Value = CurrentDb.Name ---->
RUNTIME ERROR NR. 5
Call xlApp.Run("SP5Arc_Init")

xlApp.Visible = True

End Function
**********

in the line "xlWbk.CustomDocumentProp......" i receive the error

===========
--> Runtime Error 5
Invalid Procedure Call or Argument
===========

whats wrong ?????

please help me

david
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top