Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi...
The vb macro shown below copies a chart from QlikView, pastes into Excel then puts the borders on....
The issue I have is that I need to specify the Excel range in advance.
Is there a way of determining the range which has been output?
Thanks for any help...
Paul
sub ExcelCH510
Set chart = ActiveDocument.GetSheetObject("CH510")
XLrange = "A1:T34"
Call OutputToExcel(chart, XLrange)
end sub
Function OutputToExcel(chart, XLrange)
chart.CopyTableToClipboard true
Set XLapp = CreateObject("Excel.Application")
XLapp.Visible = True
Set XLdoc = XLapp.Workbooks.Add
Set XLsheet = XLdoc.Worksheets(1)
XLSheet.Paste
XlSheet.Range(XLrange).Select
XlSheet.Range(XLrange).Borders.ColorIndex = 0
XlSheet.Range("A1").Select
End Function
Can anyone help me on this?
I haven't had the time to try it out myself, but i guess you should be able to use" xlDown" and "xlToRight", to select the output area.
/Martn