04-29-2010, 06:58 PM
Possibly the first code does not work because QM and Excel run in different UAC integrity levels.
Let the macro run in separate process as User. Set it in Properties dialog.
For the second code reference, look in Excel Help.
F1, Table of Contents, Microsoft Excel Visual Basic Reference.
It is in Excel 2003. I think in 2007 similar.
But easier to use ExcelSheet. You can attach Worksheet to ExcelSheet.
Macro Macro1422
Let the macro run in separate process as User. Set it in Properties dialog.
For the second code reference, look in Excel Help.
F1, Table of Contents, Microsoft Excel Visual Basic Reference.
It is in Excel 2003. I think in 2007 similar.
But easier to use ExcelSheet. You can attach Worksheet to ExcelSheet.
Macro Macro1422
Excel.Workbook x._getfile("$personal$\Book2.xls")
Excel.Application a=x.Application
a.Visible=TRUE; err
Excel.Windows ws=a.Windows
Excel.Window w=ws.Item(1)
w.Visible=TRUE
ExcelSheet es
es.ws=x.Worksheets.Item(1)
str s1
es.GetCell(s1 1 1)
out s1
;then can attach other sheet and work with it:
;es.ws=x.Worksheets.Item(2)
;...