BBlu
asked on
VBA Worksheet Basics
I'm trying to get the basics of the objects, properties, and methods down, but can't find any great online resources. In the meantime, I guess actual examples is the best way to go. I have some code that I got from one of the experts here in a previous question (https://www.experts-exchange.com/questions/26856102/Dashboard-Details-via-Link.html). The problem was, in the example I provided, the data was on the same page, when I'm actually linking to and importing from an Access database onto a separate Sheet I call "QB_Expenses". I'm trying to walk through the code so I can learn and adjust. My first sticking point is:
lastRow = Range("A" & Rows.Count).End(xlUp).Row
how do I change that so that I'm finding the last row on the QB_Expenses sheet instead of the current sheet?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, rspahitz. That is the perfect explanation!
ASKER
Before I close out this question, is there a way to keep the current sheet selected rather than switch when I perform the code:
lastRow = Sheets("QB_Expenses").Rang e("A" & Rows.Count).End(xlUp).Row
lastRow = Sheets("QB_Expenses").Rang
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Great help, as always. Thanks, rspahitz!
ASKER