Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello There,
I am facing problem when I need to export multiple pivot charts onto one sheet of excel with spaces.
The code that i am referring to is given below:
sub launchXL
set oXL=CreateObject("Excel.Application")
oXL.visible=True
oXL.Workbooks.Add
aSheetObj=Array("CH564","CH565","CH569","CH568")
for i=0 to UBound(aSheetObj)
oXL.Sheets.Add
Set oSH = oXL.ActiveSheet
oSH.Range("A1").Select
Set obj = ActiveDocument.GetSheetObject(aSheetObj(i))
obj.CopyTableToClipboard True
oSH.Paste
sCaption=obj.GetCaption.Name.v
set obj=Nothing
oSH.Rows("1:1").Select
oXL.Selection.Font.Bold = True
oSH.Cells.Select
oXL.Selection.Columns.AutoFit
oSH.Range("A1").Select
oSH.Name=left(sCaption,30)
set oSH=Nothing
next
set oXL=Nothing
end sub
I have created a macro for a button in which the code mentioned above is being used.
Kindly help me to get in onto one excel sheet !!!
Thanks in Advance !!
See this example: