January 28, 2021
I need some troubleshooting help regarding a VBA module.
It's very simple code, which triggers the refresh of a report, counts the rows on the report and then copies it to a different tab - there's more before and after but this is the part causing issue:
reportrows = Sheets("Amount").UsedRange.Rows.Count
I had a user reporting issues, and sat with them to understand. If we both perform the same query search, the query returns the same data, but on my computer the reportrows returns a different value to theirs. I,e mine shows as 10, and theirs shows 11, which impacts the subsequent processing.
We were using the same file, from the same network location, in Excel desktop app, both running same OS etc - although her laptop is slightly newer.
I can't for the life of me understand how hers is calculating the UsedRange.Rows.Count differently.
I've looked through documentation for the function but nothing to suggest why it's different. There's no extra data on the line, and multiple people use this code with no problem, only an issue on this 1 machine.....help?!
November 1, 2018
It is polite to mention cross-posting: https://answers.microsoft.com/.....1ac7e3c56b