View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Alex St-Pierre Alex St-Pierre is offline
external usenet poster
 
Posts: 169
Default Get right Excel application

Hi !
In Excel, when 2 differents Excel.Application, there's an error with these
lines.
Set oExcel = GetObject(, "Excel.Application")
Set oWb = oExcel.ThisWorkbook 'ERROR 1004..
Set oXlRng = oWb.Sheets(T(iTab).SheetName).Range("TableOutput")
I'm wondering if I could just say:
Set oXlRng = ThisWorkbook.Sheets(T(iTab).SheetName).Range("Tabl eOutput")
and defined oXlRng as a Range. Should I declare Excel.Range if the word
library are open into Excel?
Thanks!
Alex

--
Alex St-Pierre