Using Excel.Application

  • Thread starter Thread starter Jose
  • Start date Start date
J

Jose

I am try to pass a query into an excel template but I get
errors on the transpose part. I can not figure it out

Dim xll As New Excel.Application
Dim wb As Excel.Workbook
Dim ws As Excel.Worksheet
..
..
..

Set wb = xlapp.Workbooks(strBookName)
Set ws = wb.ActiveSheet
Set rng = ws.Range("A1:W800")
rng.Select

rng = xll.WorksheetFunction.Transpose(varResults)'<--
Crashes here!

Does any one know how to transpose a range into an excel?
 
Jose,

Try reposting the message to: microsoft.public.excel.programming


Sincerely,

Chris O.
 
Back
Top