Ok, I am using a simple line of code to grab a value for the last row with data on a sheet.
At first it appeared to work as intended, but it is holding a value and not recalculating when it is called again.![]()
Dim LastRow As Integer LastRow = ActiveSheet.UsedRange.Rows.Count
example: I push the button 5 times. It populates the information in the correct fileds. If I clear the fields and push the button again, it populates the information in the 6th spot and does nothing with the now blank 5 fields.
I may be wrong about this but I thought that even though I assigned it as a variable, when I called it a second time, it would recalculate based on the parameters assigned to it.
The plus side is that it will recognize that there is data in a field and skip it without overwriting it. But I need it to fill in blank cells if I delete them. I am going to attach my sheet so you can see what i am doing.
Cheers!
Bookmarks