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
Adding a second Storage Group to Exchange 2000
vlookup between workbooks - one cell
What is the best way in FoxPro to move or copy a file and preserve the original filename case?
SBS2008 - DCOM was unable to communicate with the computer <computer name> using any of the configured protocols.
Microsoft Front Page Forms ...
Managed Folder Policies and Managed Folder Assistant
Reset Autonumbers when moving to production
SBS 2008 Console feature is not setup correctly - Unable to create users -
call / run / execute a javascript function on a html webpage with an vb 6 activeX on the same page
invalid email recipient / LDAP