|
-
Oct 20th, 2009, 07:42 AM
#1
Thread Starter
Lively Member
[RESOLVED] COUNT func
Hi all
I am writing (slowly) a VB.net application for my AD.
Got the AD integration working, and got the computer name parsing to a variable, but it has CN= in front of it, which I don't want. Is there any way I can ask VB.net to strip this out? I know in excel there is a count() function (if I am right?). Anything similar in vb.net?
Response muchly appreciated thanks.
-
Oct 20th, 2009, 07:45 AM
#2
Re: COUNT func
Lets say your string variable is named ComputerName then you could do this:
vb Code:
ComputerName = ComputerName.Remove(0, 3)
and that will remove the first 3 characters from the string That is what I do in my AdTreeView control that you were looking at
-
Oct 20th, 2009, 07:57 AM
#3
Thread Starter
Lively Member
Re: COUNT func
chris128 - you seem to be my saviour. I'm parsing details from your control into another textbox .
thanks so much
-
Oct 20th, 2009, 12:54 PM
#4
-
Oct 20th, 2009, 01:11 PM
#5
Thread Starter
Lively Member
Re: COUNT func
Will do, nah i'm trying to do something else there is a method in my madness!
It won't let me give you any more until I spread it more, I did try!
-
Oct 20th, 2009, 01:12 PM
#6
Re: COUNT func
ah right fair enough just mark the thread as resolved then 
PS I've nearly finished updating that control, I'll post it in the codebank thread shortly
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|