vba how to reset usedrange code example
Example: excel vba how to reset usedrange
Sub ResetUsedRange(ws As Worksheet)
If ws.UsedRange.Rows.Count Then ws.UsedRange.Calculate
End Sub
'------------------------------------------------------------------
'Call the above procedure like so:
ResetUsedRange Sheet1