Avatar of Sandesh S
Sandesh S
 asked on

VBA Code to create pivot in other excel file using other file's data

I have a file named A in which I have VBA coding to create pivot in file B using data or source data for pivot in file B itself. I am able to create pivot in same file but not in other bfile as said above. Please help
VBA

Avatar of undefined
Last Comment
Sandesh S

8/22/2022 - Mon
Bill Prew

Need to see your VBA code, and a sample of the two files would help.


»bp
Sandesh S

ASKER
Hi Bill,

Apologies for delay and Thanks for your response.

Attached are the files wherein i have to create pivot in file OT. SPP is the file wherein i have the code and OT is the file wherein i have to create pivot using VBA coding. VBA code is working fine in file SPP if i try to create pivot in SPP file itself, but i want it to i.e coding in SPP to create pivot in file OT by using data in file OT itself, the same way as now it is doing in SPP.

Thank you in advance.
SPP.xlsm
OT.xlsx
Bill Prew

Which procedure, in which module, are you using?


»bp
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Sandesh S

ASKER
Hi Bill,

I am using Sub createPivotTableExistingSheet() in module 1. Please ignore module2 and 3

Thanks & Regards,

Sandesh
ASKER CERTIFIED SOLUTION
Bill Prew

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Sandesh S

ASKER
Hi Bill,

It is working perfectly fine.

I am thankful to you that you helped me at the right time. I really appreciate for all you have done to help me. I just want to say fabulous for your effort. I think you don't mind if come up with any other challenging situations like this.

Thanks again...!

Sandesh
Bill Prew

Welcome, always glad to help.


»bp
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Sandesh S

ASKER
I would like to thank Bill Prew for helping to fix this. Keep up the spirit. Thanks, Sandesh