Run Time Error 429 Unresolved while Creating Pivot Table





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







1















Could you please help me with the below codes it throws




run time error 429 activex component can't create object




on Highlighted part



    Dim myFirstRow As Long 
Dim myLastRow As Long
Dim myFirstColumn As Long
Dim myLastColumn As Long
Dim mySourceData As String
Dim myDestinationRange As String
Dim mySourceWorksheet As Worksheet
Dim myDestinationWorksheet As Worksheet
Dim myPivotTable As PivotTable

**With ThisWorkbook**
Set mySourceWorksheet = .Worksheets("WAM_RAW_DATA")
Set myDestinationWorksheet = .Worksheets.Add
End With

myDestinationRange = myDestinationWorksheet.Range("A5").Address(ReferenceStyle:=xlR1C1)
myFirstRow = 1
myLastRow = 2020
myFirstColumn = 1
myLastColumn = 40

With mySourceWorksheet.Cells
mySourceData = .Range(.Cells(myFirstRow, myFirstColumn), .Cells(myLastRow, myLastColumn)).Address(ReferenceStyle:=xlR1C1)
End With

Set myPivotTable = ThisWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:=mySourceWorksheet.Name & "!" & mySourceData).CreatePivotTable(TableDestination:=myDestinationWorksheet.Name & "!" & myDestinationRange, TableName:="PivotTableNewSheet")

With myPivotTable
.PivotFields("Agent Name").Orientation = xlRowField
.Position = 1
End With

With myPivotTable
.PivotFields("Login Date").Orientation = xlColumnField
.Position = 1
End With

With myPivotTable
.PivotFields("Login Time").Orientation = xlDataField
.Position = 1
.Function = xlMin
.NumberFormat = "h:mm:ss"
End With
End Sub









share|improve this question




















  • 1





    Please tell in which line you get the error. It's impossible that it occurs here With ThisWorkbook

    – Pᴇʜ
    Nov 23 '18 at 12:48











  • its in the 10th line when i run a macro it got stuck and This Workbook line highlighted in yellow

    – Sachin
    Nov 23 '18 at 13:38











  • you are running this in an active excel aplication right?

    – Wouter
    Nov 23 '18 at 13:59











  • Yes i am running this in an active Excel sheet

    – Sachin
    Nov 23 '18 at 14:00


















1















Could you please help me with the below codes it throws




run time error 429 activex component can't create object




on Highlighted part



    Dim myFirstRow As Long 
Dim myLastRow As Long
Dim myFirstColumn As Long
Dim myLastColumn As Long
Dim mySourceData As String
Dim myDestinationRange As String
Dim mySourceWorksheet As Worksheet
Dim myDestinationWorksheet As Worksheet
Dim myPivotTable As PivotTable

**With ThisWorkbook**
Set mySourceWorksheet = .Worksheets("WAM_RAW_DATA")
Set myDestinationWorksheet = .Worksheets.Add
End With

myDestinationRange = myDestinationWorksheet.Range("A5").Address(ReferenceStyle:=xlR1C1)
myFirstRow = 1
myLastRow = 2020
myFirstColumn = 1
myLastColumn = 40

With mySourceWorksheet.Cells
mySourceData = .Range(.Cells(myFirstRow, myFirstColumn), .Cells(myLastRow, myLastColumn)).Address(ReferenceStyle:=xlR1C1)
End With

Set myPivotTable = ThisWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:=mySourceWorksheet.Name & "!" & mySourceData).CreatePivotTable(TableDestination:=myDestinationWorksheet.Name & "!" & myDestinationRange, TableName:="PivotTableNewSheet")

With myPivotTable
.PivotFields("Agent Name").Orientation = xlRowField
.Position = 1
End With

With myPivotTable
.PivotFields("Login Date").Orientation = xlColumnField
.Position = 1
End With

With myPivotTable
.PivotFields("Login Time").Orientation = xlDataField
.Position = 1
.Function = xlMin
.NumberFormat = "h:mm:ss"
End With
End Sub









share|improve this question




















  • 1





    Please tell in which line you get the error. It's impossible that it occurs here With ThisWorkbook

    – Pᴇʜ
    Nov 23 '18 at 12:48











  • its in the 10th line when i run a macro it got stuck and This Workbook line highlighted in yellow

    – Sachin
    Nov 23 '18 at 13:38











  • you are running this in an active excel aplication right?

    – Wouter
    Nov 23 '18 at 13:59











  • Yes i am running this in an active Excel sheet

    – Sachin
    Nov 23 '18 at 14:00














1












1








1








Could you please help me with the below codes it throws




run time error 429 activex component can't create object




on Highlighted part



    Dim myFirstRow As Long 
Dim myLastRow As Long
Dim myFirstColumn As Long
Dim myLastColumn As Long
Dim mySourceData As String
Dim myDestinationRange As String
Dim mySourceWorksheet As Worksheet
Dim myDestinationWorksheet As Worksheet
Dim myPivotTable As PivotTable

**With ThisWorkbook**
Set mySourceWorksheet = .Worksheets("WAM_RAW_DATA")
Set myDestinationWorksheet = .Worksheets.Add
End With

myDestinationRange = myDestinationWorksheet.Range("A5").Address(ReferenceStyle:=xlR1C1)
myFirstRow = 1
myLastRow = 2020
myFirstColumn = 1
myLastColumn = 40

With mySourceWorksheet.Cells
mySourceData = .Range(.Cells(myFirstRow, myFirstColumn), .Cells(myLastRow, myLastColumn)).Address(ReferenceStyle:=xlR1C1)
End With

Set myPivotTable = ThisWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:=mySourceWorksheet.Name & "!" & mySourceData).CreatePivotTable(TableDestination:=myDestinationWorksheet.Name & "!" & myDestinationRange, TableName:="PivotTableNewSheet")

With myPivotTable
.PivotFields("Agent Name").Orientation = xlRowField
.Position = 1
End With

With myPivotTable
.PivotFields("Login Date").Orientation = xlColumnField
.Position = 1
End With

With myPivotTable
.PivotFields("Login Time").Orientation = xlDataField
.Position = 1
.Function = xlMin
.NumberFormat = "h:mm:ss"
End With
End Sub









share|improve this question
















Could you please help me with the below codes it throws




run time error 429 activex component can't create object




on Highlighted part



    Dim myFirstRow As Long 
Dim myLastRow As Long
Dim myFirstColumn As Long
Dim myLastColumn As Long
Dim mySourceData As String
Dim myDestinationRange As String
Dim mySourceWorksheet As Worksheet
Dim myDestinationWorksheet As Worksheet
Dim myPivotTable As PivotTable

**With ThisWorkbook**
Set mySourceWorksheet = .Worksheets("WAM_RAW_DATA")
Set myDestinationWorksheet = .Worksheets.Add
End With

myDestinationRange = myDestinationWorksheet.Range("A5").Address(ReferenceStyle:=xlR1C1)
myFirstRow = 1
myLastRow = 2020
myFirstColumn = 1
myLastColumn = 40

With mySourceWorksheet.Cells
mySourceData = .Range(.Cells(myFirstRow, myFirstColumn), .Cells(myLastRow, myLastColumn)).Address(ReferenceStyle:=xlR1C1)
End With

Set myPivotTable = ThisWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:=mySourceWorksheet.Name & "!" & mySourceData).CreatePivotTable(TableDestination:=myDestinationWorksheet.Name & "!" & myDestinationRange, TableName:="PivotTableNewSheet")

With myPivotTable
.PivotFields("Agent Name").Orientation = xlRowField
.Position = 1
End With

With myPivotTable
.PivotFields("Login Date").Orientation = xlColumnField
.Position = 1
End With

With myPivotTable
.PivotFields("Login Time").Orientation = xlDataField
.Position = 1
.Function = xlMin
.NumberFormat = "h:mm:ss"
End With
End Sub






excel vba excel-vba runtime-error






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 23 '18 at 12:47









Pᴇʜ

25.2k63052




25.2k63052










asked Nov 23 '18 at 12:41









SachinSachin

165




165








  • 1





    Please tell in which line you get the error. It's impossible that it occurs here With ThisWorkbook

    – Pᴇʜ
    Nov 23 '18 at 12:48











  • its in the 10th line when i run a macro it got stuck and This Workbook line highlighted in yellow

    – Sachin
    Nov 23 '18 at 13:38











  • you are running this in an active excel aplication right?

    – Wouter
    Nov 23 '18 at 13:59











  • Yes i am running this in an active Excel sheet

    – Sachin
    Nov 23 '18 at 14:00














  • 1





    Please tell in which line you get the error. It's impossible that it occurs here With ThisWorkbook

    – Pᴇʜ
    Nov 23 '18 at 12:48











  • its in the 10th line when i run a macro it got stuck and This Workbook line highlighted in yellow

    – Sachin
    Nov 23 '18 at 13:38











  • you are running this in an active excel aplication right?

    – Wouter
    Nov 23 '18 at 13:59











  • Yes i am running this in an active Excel sheet

    – Sachin
    Nov 23 '18 at 14:00








1




1





Please tell in which line you get the error. It's impossible that it occurs here With ThisWorkbook

– Pᴇʜ
Nov 23 '18 at 12:48





Please tell in which line you get the error. It's impossible that it occurs here With ThisWorkbook

– Pᴇʜ
Nov 23 '18 at 12:48













its in the 10th line when i run a macro it got stuck and This Workbook line highlighted in yellow

– Sachin
Nov 23 '18 at 13:38





its in the 10th line when i run a macro it got stuck and This Workbook line highlighted in yellow

– Sachin
Nov 23 '18 at 13:38













you are running this in an active excel aplication right?

– Wouter
Nov 23 '18 at 13:59





you are running this in an active excel aplication right?

– Wouter
Nov 23 '18 at 13:59













Yes i am running this in an active Excel sheet

– Sachin
Nov 23 '18 at 14:00





Yes i am running this in an active Excel sheet

– Sachin
Nov 23 '18 at 14:00












1 Answer
1






active

oldest

votes


















0














This might help How do I resolve "Run-time error '429': ActiveX component can't create object"?



However, meanwhile you can try some other solutions to use that statement, like:



Dim WB As Workbook

Set WB = ActiveWorkbook
! OR !
Set WB = Workbooks("name of workbook.xlsm")





share|improve this answer
























  • thank you so much, worked !!!

    – Sachin
    Nov 24 '18 at 12:52











  • Which part worked if you don't mind :)

    – DarXyde
    Nov 25 '18 at 9:15






  • 1





    Second one... Thank You

    – Sachin
    Dec 11 '18 at 9:11












Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53446911%2frun-time-error-429-unresolved-while-creating-pivot-table%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














This might help How do I resolve "Run-time error '429': ActiveX component can't create object"?



However, meanwhile you can try some other solutions to use that statement, like:



Dim WB As Workbook

Set WB = ActiveWorkbook
! OR !
Set WB = Workbooks("name of workbook.xlsm")





share|improve this answer
























  • thank you so much, worked !!!

    – Sachin
    Nov 24 '18 at 12:52











  • Which part worked if you don't mind :)

    – DarXyde
    Nov 25 '18 at 9:15






  • 1





    Second one... Thank You

    – Sachin
    Dec 11 '18 at 9:11
















0














This might help How do I resolve "Run-time error '429': ActiveX component can't create object"?



However, meanwhile you can try some other solutions to use that statement, like:



Dim WB As Workbook

Set WB = ActiveWorkbook
! OR !
Set WB = Workbooks("name of workbook.xlsm")





share|improve this answer
























  • thank you so much, worked !!!

    – Sachin
    Nov 24 '18 at 12:52











  • Which part worked if you don't mind :)

    – DarXyde
    Nov 25 '18 at 9:15






  • 1





    Second one... Thank You

    – Sachin
    Dec 11 '18 at 9:11














0












0








0







This might help How do I resolve "Run-time error '429': ActiveX component can't create object"?



However, meanwhile you can try some other solutions to use that statement, like:



Dim WB As Workbook

Set WB = ActiveWorkbook
! OR !
Set WB = Workbooks("name of workbook.xlsm")





share|improve this answer













This might help How do I resolve "Run-time error '429': ActiveX component can't create object"?



However, meanwhile you can try some other solutions to use that statement, like:



Dim WB As Workbook

Set WB = ActiveWorkbook
! OR !
Set WB = Workbooks("name of workbook.xlsm")






share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 24 '18 at 9:03









DarXydeDarXyde

26427




26427













  • thank you so much, worked !!!

    – Sachin
    Nov 24 '18 at 12:52











  • Which part worked if you don't mind :)

    – DarXyde
    Nov 25 '18 at 9:15






  • 1





    Second one... Thank You

    – Sachin
    Dec 11 '18 at 9:11



















  • thank you so much, worked !!!

    – Sachin
    Nov 24 '18 at 12:52











  • Which part worked if you don't mind :)

    – DarXyde
    Nov 25 '18 at 9:15






  • 1





    Second one... Thank You

    – Sachin
    Dec 11 '18 at 9:11

















thank you so much, worked !!!

– Sachin
Nov 24 '18 at 12:52





thank you so much, worked !!!

– Sachin
Nov 24 '18 at 12:52













Which part worked if you don't mind :)

– DarXyde
Nov 25 '18 at 9:15





Which part worked if you don't mind :)

– DarXyde
Nov 25 '18 at 9:15




1




1





Second one... Thank You

– Sachin
Dec 11 '18 at 9:11





Second one... Thank You

– Sachin
Dec 11 '18 at 9:11




















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53446911%2frun-time-error-429-unresolved-while-creating-pivot-table%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

"Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

Alcedinidae

RAC Tourist Trophy