Datasheet(Global) row count
I am trying to get a count of rows ( based on Usernames entered).
I have used 'Rowcount= DataTable.GetSheet("Global").GetRowCount
'msgbox "RowCount= " &RowCount,1
but each Iteration brings back the row total at the end of that Iteration.
What I would like to see, is the row count in increments after each Iteration , with a total at the end of all rows and then show that Total as "Total Login Usernames = "
That code worked on handling showing the rows in increments. Thank you.
Any idea on the second part of showing the final total of rows in the output? maybe showing the count in a column and then the total?
Assuming you are processing all rows add this as the last line of you code . What this is checking is, if this is the last row in the table write out the total number of rows
If Cint(DataTable.GetSheet("Global").GetCurrentRow) = Cint(DataTable.GetSheet("Global").RowCount) Then MsgBox "Rows Processed =" Cint(DataTable.GetSheet("Global").RowCount) End If
I used coude sent, but received this Run error -
Object doesn't support this property or method: 'DataTable.GetSheet(...).Rowcount'
Line (63): "If Cint(DataTable.GetSheet("Global").GetCurrentRow) = Cint(DataTable.GetSheet("Global").RowCount) Then".
looks the syntax is incorrect. the method getCurrentRow needs a pair of parathesis.
and the dtSheet object doesn't have RowCount property.