MadMaxx Posted January 20, 2005 Posted January 20, 2005 Hello all, I have a problem that I can't seem to figure out. here is the code. Dim L_USER As Object Dim L_ITEM As ListViewItem Dim L_COLLECTION As ListView.ListViewItemCollection = lstComputers.Items Dim ERR_COUNT as integer Dim ERR_COMPS() as String For Each L_ITEM In L_COLLECTION Try L_USER = GetObject("WinNT://" & L_ITEM.Text & "/" & txtLocalAccount.Text & ", user") L_USER.SetPassword(txtNewPassword.Text) prgTotalProgress.Increment(1) Catch ex As Exception ERR_COUNT += 1 ERR_COMPS(ERR_COUNT) = L_ITEM.ToString prgTotalProgress.Increment(1) End Try Next The error happens when I try to add L_ITEM to the array. Anyone have any suggestions. Quote
Administrators PlausiblyDamp Posted January 20, 2005 Administrators Posted January 20, 2005 You are not declaring the array size anywhere - hence it will not accept any entries. You will need to either decalre it with a size large enough to take all possible entries or investigate the redim command to see how to change the size of the array at runtime. Also it usually helps to get a response if you give an indication of exactly what error you are getting rather than expecting people to guess. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
MadMaxx Posted January 20, 2005 Author Posted January 20, 2005 DUH on my part. Thanks for the help. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.