• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Macro Error

villival

Member
Hi All,
As i am having a task of preparing hourly reports and publish it across
taught of automate the process in using Macro



I was trying to record a Macro which contains following steps

1- Copy Main data

2- Filtering Data at copying into in worksheet

3 - Applying 3 Formuales

4- Creating Pivot Chart

After doing it i saved it Xlsm file, when i tried run the macro again i got the runtime error

how to reslove this issue, due to confidentiality i could not share the sample sheet

hope you guys you understand IT Policies

Thanks
Anil
 

Attachments

  • run-time error.JPG
    run-time error.JPG
    19.8 KB · Views: 12
Hi !

This kind of error results from bad data or bad code …
I hope you understand without an attachment neither the codeline
where error occurs we can't go further !

Progress in your code with step by step mode via F8 key to find out
and watch out variables values in Locals window …
 
Hi !

This kind of error results from bad data or bad code …
I hope you understand without an attachment neither the codeline
where error occurs we can't go further !

Progress in your code with step by step mode via F8 key to find out
and watch out variables values in Locals window …
Hi Marc

Please find the error code below

ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"Sheet2!R1C1:R1048576C21", Version:=xlPivotTableVersion14).CreatePivotTable _
TableDestination:="Sheet4!R3C1", TableName:="PivotTable1", DefaultVersion _
:=xlPivotTableVersion14
 

You have to check every range, if yet exists PivotTable1 …

Maybe a pivot expert could have an idea,
it's not my cup of tea without any workbook.
 
Back
Top