Meaning of “Updated?” message in debug mode












0















Sub update_button()
'
' update_button Makro
'

'

Set from = Sheet1
Set towards = Sheet5

With from
lastRowIndex = .Cells(.Rows.Count, "A").End(xlUp).Row
.Range(Cells(2, 1), Cells(lastRowIndex, 4)).Copy
End With
towards.Cells(7, 1).Paste

End Sub


This code is supposed to copy cells between A2 and the last row in the first sheet. Then paste it into a specific cell in another sheet. Running this code gives me Runtime error 1004. Application defined or object defined error.



By going into debug mode, and hovering over Cells(2,1), A message comes up saying Cells(2,1)="Updated?". From what I can see, Cells(2,1) is well defined and there should be no issue with it. I am unable to search anything about it given how generic the name is.



Note that I have a non-english version of excel and I have translated a few words to make the code slightly less confusing.










share|improve this question

























  • Yes, I have Module1 and Module2. This code is in module2.

    – mcNogard
    Nov 14 '18 at 13:10











  • When I come to think about it, it is not a message, but rather the assignment Cells(2,1)="updated?".

    – mcNogard
    Nov 14 '18 at 13:36
















0















Sub update_button()
'
' update_button Makro
'

'

Set from = Sheet1
Set towards = Sheet5

With from
lastRowIndex = .Cells(.Rows.Count, "A").End(xlUp).Row
.Range(Cells(2, 1), Cells(lastRowIndex, 4)).Copy
End With
towards.Cells(7, 1).Paste

End Sub


This code is supposed to copy cells between A2 and the last row in the first sheet. Then paste it into a specific cell in another sheet. Running this code gives me Runtime error 1004. Application defined or object defined error.



By going into debug mode, and hovering over Cells(2,1), A message comes up saying Cells(2,1)="Updated?". From what I can see, Cells(2,1) is well defined and there should be no issue with it. I am unable to search anything about it given how generic the name is.



Note that I have a non-english version of excel and I have translated a few words to make the code slightly less confusing.










share|improve this question

























  • Yes, I have Module1 and Module2. This code is in module2.

    – mcNogard
    Nov 14 '18 at 13:10











  • When I come to think about it, it is not a message, but rather the assignment Cells(2,1)="updated?".

    – mcNogard
    Nov 14 '18 at 13:36














0












0








0








Sub update_button()
'
' update_button Makro
'

'

Set from = Sheet1
Set towards = Sheet5

With from
lastRowIndex = .Cells(.Rows.Count, "A").End(xlUp).Row
.Range(Cells(2, 1), Cells(lastRowIndex, 4)).Copy
End With
towards.Cells(7, 1).Paste

End Sub


This code is supposed to copy cells between A2 and the last row in the first sheet. Then paste it into a specific cell in another sheet. Running this code gives me Runtime error 1004. Application defined or object defined error.



By going into debug mode, and hovering over Cells(2,1), A message comes up saying Cells(2,1)="Updated?". From what I can see, Cells(2,1) is well defined and there should be no issue with it. I am unable to search anything about it given how generic the name is.



Note that I have a non-english version of excel and I have translated a few words to make the code slightly less confusing.










share|improve this question
















Sub update_button()
'
' update_button Makro
'

'

Set from = Sheet1
Set towards = Sheet5

With from
lastRowIndex = .Cells(.Rows.Count, "A").End(xlUp).Row
.Range(Cells(2, 1), Cells(lastRowIndex, 4)).Copy
End With
towards.Cells(7, 1).Paste

End Sub


This code is supposed to copy cells between A2 and the last row in the first sheet. Then paste it into a specific cell in another sheet. Running this code gives me Runtime error 1004. Application defined or object defined error.



By going into debug mode, and hovering over Cells(2,1), A message comes up saying Cells(2,1)="Updated?". From what I can see, Cells(2,1) is well defined and there should be no issue with it. I am unable to search anything about it given how generic the name is.



Note that I have a non-english version of excel and I have translated a few words to make the code slightly less confusing.







excel vba excel-vba






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 14 '18 at 13:40







mcNogard

















asked Nov 14 '18 at 13:06









mcNogardmcNogard

247




247













  • Yes, I have Module1 and Module2. This code is in module2.

    – mcNogard
    Nov 14 '18 at 13:10











  • When I come to think about it, it is not a message, but rather the assignment Cells(2,1)="updated?".

    – mcNogard
    Nov 14 '18 at 13:36



















  • Yes, I have Module1 and Module2. This code is in module2.

    – mcNogard
    Nov 14 '18 at 13:10











  • When I come to think about it, it is not a message, but rather the assignment Cells(2,1)="updated?".

    – mcNogard
    Nov 14 '18 at 13:36

















Yes, I have Module1 and Module2. This code is in module2.

– mcNogard
Nov 14 '18 at 13:10





Yes, I have Module1 and Module2. This code is in module2.

– mcNogard
Nov 14 '18 at 13:10













When I come to think about it, it is not a message, but rather the assignment Cells(2,1)="updated?".

– mcNogard
Nov 14 '18 at 13:36





When I come to think about it, it is not a message, but rather the assignment Cells(2,1)="updated?".

– mcNogard
Nov 14 '18 at 13:36












1 Answer
1






active

oldest

votes


















1














replace your instruction



.Range(Cells(2, 1), Cells(lastRowIndex, 4)).Copy


with



Range(.Cells(2, 1), .Cells(lastRowIndex, 4)).Copy





share|improve this answer
























  • What does the "updated?" message mean? Do you know?

    – mcNogard
    Nov 14 '18 at 13:16











  • Write Application.EnableEvents =False at the beginning of your code and then turn it back on before End sub.You might have some other code at worksheet level which might be causing this message to show up.

    – Imran Malek
    Nov 14 '18 at 13:19






  • 1





    what is the content of from.cells(2,1) ?

    – h2so4
    Nov 14 '18 at 13:42








  • 1





    "Updated" is the value held in cell A2 of the currently Activesheet. @h2so4 said correctly to put the . before Cells(2,1) as without it Cells references the activesheet and not the sheet used in the From keyword.

    – Darren Bartrup-Cook
    Nov 14 '18 at 13:42








  • 3





    The reason for the runtime error is that .Range is looking at the From worksheet and Cells is looking at the ActiveSheet. If these are the same, then no problem but if they're different you're trying to make a range on one sheet using cells from a different sheet.

    – Darren Bartrup-Cook
    Nov 14 '18 at 13:44











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%2f53300942%2fmeaning-of-updated-message-in-debug-mode%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









1














replace your instruction



.Range(Cells(2, 1), Cells(lastRowIndex, 4)).Copy


with



Range(.Cells(2, 1), .Cells(lastRowIndex, 4)).Copy





share|improve this answer
























  • What does the "updated?" message mean? Do you know?

    – mcNogard
    Nov 14 '18 at 13:16











  • Write Application.EnableEvents =False at the beginning of your code and then turn it back on before End sub.You might have some other code at worksheet level which might be causing this message to show up.

    – Imran Malek
    Nov 14 '18 at 13:19






  • 1





    what is the content of from.cells(2,1) ?

    – h2so4
    Nov 14 '18 at 13:42








  • 1





    "Updated" is the value held in cell A2 of the currently Activesheet. @h2so4 said correctly to put the . before Cells(2,1) as without it Cells references the activesheet and not the sheet used in the From keyword.

    – Darren Bartrup-Cook
    Nov 14 '18 at 13:42








  • 3





    The reason for the runtime error is that .Range is looking at the From worksheet and Cells is looking at the ActiveSheet. If these are the same, then no problem but if they're different you're trying to make a range on one sheet using cells from a different sheet.

    – Darren Bartrup-Cook
    Nov 14 '18 at 13:44
















1














replace your instruction



.Range(Cells(2, 1), Cells(lastRowIndex, 4)).Copy


with



Range(.Cells(2, 1), .Cells(lastRowIndex, 4)).Copy





share|improve this answer
























  • What does the "updated?" message mean? Do you know?

    – mcNogard
    Nov 14 '18 at 13:16











  • Write Application.EnableEvents =False at the beginning of your code and then turn it back on before End sub.You might have some other code at worksheet level which might be causing this message to show up.

    – Imran Malek
    Nov 14 '18 at 13:19






  • 1





    what is the content of from.cells(2,1) ?

    – h2so4
    Nov 14 '18 at 13:42








  • 1





    "Updated" is the value held in cell A2 of the currently Activesheet. @h2so4 said correctly to put the . before Cells(2,1) as without it Cells references the activesheet and not the sheet used in the From keyword.

    – Darren Bartrup-Cook
    Nov 14 '18 at 13:42








  • 3





    The reason for the runtime error is that .Range is looking at the From worksheet and Cells is looking at the ActiveSheet. If these are the same, then no problem but if they're different you're trying to make a range on one sheet using cells from a different sheet.

    – Darren Bartrup-Cook
    Nov 14 '18 at 13:44














1












1








1







replace your instruction



.Range(Cells(2, 1), Cells(lastRowIndex, 4)).Copy


with



Range(.Cells(2, 1), .Cells(lastRowIndex, 4)).Copy





share|improve this answer













replace your instruction



.Range(Cells(2, 1), Cells(lastRowIndex, 4)).Copy


with



Range(.Cells(2, 1), .Cells(lastRowIndex, 4)).Copy






share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 14 '18 at 13:13









h2so4h2so4

1,501159




1,501159













  • What does the "updated?" message mean? Do you know?

    – mcNogard
    Nov 14 '18 at 13:16











  • Write Application.EnableEvents =False at the beginning of your code and then turn it back on before End sub.You might have some other code at worksheet level which might be causing this message to show up.

    – Imran Malek
    Nov 14 '18 at 13:19






  • 1





    what is the content of from.cells(2,1) ?

    – h2so4
    Nov 14 '18 at 13:42








  • 1





    "Updated" is the value held in cell A2 of the currently Activesheet. @h2so4 said correctly to put the . before Cells(2,1) as without it Cells references the activesheet and not the sheet used in the From keyword.

    – Darren Bartrup-Cook
    Nov 14 '18 at 13:42








  • 3





    The reason for the runtime error is that .Range is looking at the From worksheet and Cells is looking at the ActiveSheet. If these are the same, then no problem but if they're different you're trying to make a range on one sheet using cells from a different sheet.

    – Darren Bartrup-Cook
    Nov 14 '18 at 13:44



















  • What does the "updated?" message mean? Do you know?

    – mcNogard
    Nov 14 '18 at 13:16











  • Write Application.EnableEvents =False at the beginning of your code and then turn it back on before End sub.You might have some other code at worksheet level which might be causing this message to show up.

    – Imran Malek
    Nov 14 '18 at 13:19






  • 1





    what is the content of from.cells(2,1) ?

    – h2so4
    Nov 14 '18 at 13:42








  • 1





    "Updated" is the value held in cell A2 of the currently Activesheet. @h2so4 said correctly to put the . before Cells(2,1) as without it Cells references the activesheet and not the sheet used in the From keyword.

    – Darren Bartrup-Cook
    Nov 14 '18 at 13:42








  • 3





    The reason for the runtime error is that .Range is looking at the From worksheet and Cells is looking at the ActiveSheet. If these are the same, then no problem but if they're different you're trying to make a range on one sheet using cells from a different sheet.

    – Darren Bartrup-Cook
    Nov 14 '18 at 13:44

















What does the "updated?" message mean? Do you know?

– mcNogard
Nov 14 '18 at 13:16





What does the "updated?" message mean? Do you know?

– mcNogard
Nov 14 '18 at 13:16













Write Application.EnableEvents =False at the beginning of your code and then turn it back on before End sub.You might have some other code at worksheet level which might be causing this message to show up.

– Imran Malek
Nov 14 '18 at 13:19





Write Application.EnableEvents =False at the beginning of your code and then turn it back on before End sub.You might have some other code at worksheet level which might be causing this message to show up.

– Imran Malek
Nov 14 '18 at 13:19




1




1





what is the content of from.cells(2,1) ?

– h2so4
Nov 14 '18 at 13:42







what is the content of from.cells(2,1) ?

– h2so4
Nov 14 '18 at 13:42






1




1





"Updated" is the value held in cell A2 of the currently Activesheet. @h2so4 said correctly to put the . before Cells(2,1) as without it Cells references the activesheet and not the sheet used in the From keyword.

– Darren Bartrup-Cook
Nov 14 '18 at 13:42







"Updated" is the value held in cell A2 of the currently Activesheet. @h2so4 said correctly to put the . before Cells(2,1) as without it Cells references the activesheet and not the sheet used in the From keyword.

– Darren Bartrup-Cook
Nov 14 '18 at 13:42






3




3





The reason for the runtime error is that .Range is looking at the From worksheet and Cells is looking at the ActiveSheet. If these are the same, then no problem but if they're different you're trying to make a range on one sheet using cells from a different sheet.

– Darren Bartrup-Cook
Nov 14 '18 at 13:44





The reason for the runtime error is that .Range is looking at the From worksheet and Cells is looking at the ActiveSheet. If these are the same, then no problem but if they're different you're trying to make a range on one sheet using cells from a different sheet.

– Darren Bartrup-Cook
Nov 14 '18 at 13:44




















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%2f53300942%2fmeaning-of-updated-message-in-debug-mode%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

Bressuire

Vorschmack

Quarantine