Run Time Error 429 Unresolved while Creating Pivot Table
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
add a comment |
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
1
Please tell in which line you get the error. It's impossible that it occurs hereWith 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
add a comment |
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
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
excel vba excel-vba runtime-error
edited Nov 23 '18 at 12:47
Pᴇʜ
22.7k52850
22.7k52850
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 hereWith 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
add a comment |
1
Please tell in which line you get the error. It's impossible that it occurs hereWith 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
add a comment |
1 Answer
1
active
oldest
votes
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")
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
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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")
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
add a comment |
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")
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
add a comment |
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")
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")
answered Nov 24 '18 at 9:03
DarXydeDarXyde
24026
24026
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
add a comment |
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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