Microsoft
Software
Hardware
Network
Question : Array Help
I have an array that gets populated from a datatable.
The problem I am facing, I need the array to have increments of 4.
If the datatable only has 2 records, I need to pad the array with 2 additional positions.
If the datatable only has 13 records, I need to pad the array with 3 additional etc. etc.
Any thoughts.
Code Snippet:
1:
arrToLabels(i) = "To:" + DtSet.Tables(0).Rows(i).Item(0) + "-" + DtSet.Tables(0).Rows(i).Item(1)
Open in New Window
Select All
Answer : Array Help
If DtSet.Tables(0).Rows / 4 = 0 Then
arrSize = DtSet.Tables(0).Rows
Else
arrSize = DtSet.Tables(0).Rows + (4 - (DtSet.Tables(0).Rows Mod 4))
End If
Random Solutions
Why wont a hp laptop power up?
How to change SQL 2008 reporting services from native mode to sharepoint integrated mode
Checking a Dataset for DBNull whiclst using the Compute SUM function
SBS 2008/Exchange 2007 - offsite website hosting by 1 and 1
Converting Dates with SQL
ORA-12514 TNS:listener does not currently know of service requested in connect (yet agian?)
Query based on multiple criteria
Excel VBA custom function
Retrieve most current records
Autocorrect Custom Dictionary