cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 

MS Excel VBO - Extended Amend Pivot Table Data Source恫恤恄恦

ShotaHomma
Level 3
MS Excel VBO - Extended Amend Pivot Table Data Source恧态
ę·»ä»˜č³‡ę–™ć®ć‚ˆć†ć«ćƒ‘ćƒ©ćƒ”ćƒ¼ć‚æć‚„Excelćƒ‡ćƒ¼ć‚æć‚’å…„ć‚Œć¦ć‚‚å‹•ä½œć—ć¾ć›ć‚“ć€‚
35074.png
ć‚‚ć—ć€å‹•ä½œć•ć›ćŸę–¹ćŒć„ć‚‰ć£ć—ć‚ƒć„ć¾ć—ćŸć‚‰ć€
ćƒ‘ćƒ©ćƒ”ćƒ¼ć‚æć‚„ć€å‰ęę”ä»¶ē­‰ć€ę•™ćˆć¦ć„ćŸć ć‘ćŖć„ć§ć—ć‚‡ć†ć‹ļ¼Ÿ
5 REPLIES 5

Hi

The code in this I found didn't work correctly and I had to change it. The code I used for this is below and works well so should work for you. Let me know if everything worked for you.

Inputs - Handle, Workbook, Worksheet, Range, PivotTableName, DataWorksheet
================================================================
Dim wb, ws, wd As Object
Dim excel, sheet As Object
Dim rng As String

wb = GetWorkbook(Handle, Workbook)
wd = wb.Worksheets(DataWorksheet)
ws = GetWorksheet(Handle, Workbook, Worksheet)

wb.Activate()
ws.Activate()

excel = wb.Application
sheet = excel.ActiveSheet

rng = sheet.Range(Range).Address(ReferenceStyle:=-4150)
rng = wd.Name & "!" & rng


ws.Activate()
sheet = excel.ActiveSheet
sheet.PivotTables(PivotTableName).SourceData = rng
sheet.PivotTables(PivotTableName).RefreshTable
#MVP

ewilson
Staff
Staff
@Michael ONeil,

Thank you for your contribution to the Community. šŸ˜‰ We'll get your fix added to the Extended VBO on the DX.

Cheers,
Eric​

ewilson
Staff
Staff
FYI - The VBO has been updated on the DX. The latest version is v2.3.

https://digitalexchange.blueprism.com/dx/entry/9648/solution/ms-excel-vbo---extended

Cheers,
Eric

Great news @ewilson thank you :)​
#MVP

ShotaHomma
Level 3
@Michael ONeil
@ewilson

Thank you for your quick response.

The good news is that the latest version has been released.


I'll give try it.​​