VBA question create Excel Object and run XLSTART startup excel

M

moonhk

Hi All


In C:\Documents and Settings\moonhkt\Application Data\Microsoft\Excel
\XLSTART have PERSONAL.xls file.

In my VBA, Winword document, have below coding.

How to include open PERSONAL.xls file ? My personal.xls have some
funcations on it.

Set AppExcel = CreateObject("Excel.Application")
Set ExcelDocs = AppExcel.Workbooks
ExcelDocs.Open FN
' ~~ExcelDocs.Application.ActiveWorkbook.RunAutoMacros
xlAutoOpen
AppExcel.Visible = True
Set ExcelDocs = Nothing
Set AppExcel = Nothing

moonhkt
 
B

Bob Phillips

Set AppExcel = CreateObject("Excel.Application")
Set ExcelDocs = AppExcel.Workbooks.Open(FN)
' ~~ExcelDocs.Application.ActiveWorkbook.RunAutoMacros
xlAutoOpen
AppExcel.Visible = True
Set ExcelDocs = Nothing
Set AppExcel = Nothing
 

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