Reputation: 1582
Hey I wanted to take the loop below and also make it skip admin shares if the share starts with "_o _"
my loop is:
'Compares The UnApproved Shares to the Current Shares
For Each objItem In colItems
Dim StrNonUnapprovedShares, Item
StrCurrentShares = objItem.name
if instr(AdminShares,lcase(objitem.name)) > 0 or mid(objitem.name,2,1) = "$" or left(lcase(objitem.name),10) = "pkgsvrhost" or instr("_o_") > 0 then
'Skipping known admin share
Else
For each Item in arrUnApprovedLines
If Lcase(Item) = Lcase(strCurrentShares) Then
StrNonUnapprovedShares = (StrNonUnapprovedShares & strCurrentShares & vbCrLf)
End If
Next
End If
Next
I inserted an "or instr("_O _")" after the "pkgsvrhost" on the 5th line, but it errored with the error --type mismatch" '[string: "_O _"]--
Upvotes: 0
Views: 555