Microsoft Teams Blog articles

VBA Code "Next" button. Should be so simple...

The user's "Next" button in a VBA userform isn't moving to the next record, always displaying a "Last record" message, while the "Previous" button functions correctly. The issue arises from an `If...Then` loop within the "Next" button's code. This loop incorrectly checks if the current row is less than `LastRow`, which is not defined, leading the button to always trigger the "Last record" message.
favicon
techcommunity.microsoft.com
techcommunity.microsoft.com
Create attached notes ...