Ok, I think it probably just has to do with not having the proper DistinguishedName path when you are trying to bind to the group object. In the NT4 world, you could get away with just binding to the account name--in the LDAP world, you need to bind to the full path to the object. There are ways to get around that and I can go into them if you would like but, for now, I am going to show what you need to do in order to make sure you have the right DN path.
I'm not 100% sure what you are trying enter in the text box but it looks like you are just trying to bind to a group and export the members.
I added a few lines of code that will echo out a couple of things during the script that will make it easier to understand how it works.
The DNSDomain at my current client is: DC=ds,DC=ad,DC=company,DC=com
The DN path to a group would be something like:
CN=GROUP1,OU=SSMSTL,OU=SSMHC,DC=ds,DC=ad,DC=company,DC=com
Your script is already getting some of the path (RootDSE will return the DNSDomain and your code is prepending CN=). But, you still need to make sure the rest of the path is there (unless all of your groups are in the root container--not a good idea). So, this is what I would need to enter in the popup box in order to bind to that group and get the members:
GROUP1,OU=SSMSTL,OU=SSMHC, (don't forget the comma at the end)
Here is the modified code that will echo a couple of things out:
dim target
strdnsdomain="test"
' Bind to Active Directory
Set objRootDSE = GetObject("LDAP://RootDSE")
strDNSDomain = objRootDSE.Get("DefaultNamingContext")
Set FSO = CreateObject("Scripting.FileSystemObject")
Set WshNetwork = WScript.CreateObject("WScript.Network")
Set TextFile = FSO.OpenTextFile("C:\Info.txt", 2, True)
WScript.Echo "DNSdomain: " & strDNSDomain
target=inputbox("Choose Attribute Name")
if target="" then wscript.quit 'user clicked cancel
strGroup = "LDAP://cn="& target & strDNSDomain
WScript.Echo strGroup
Set objGroup = GetObject(strGroup)
objGroup.getInfo
arrMemberOf = objGroup.GetEx("member")
For Each strMember in arrMemberOf
tempvarMember = tempvarMember & strMember & VbCrLf
Next
TextFile.WriteLine "members '" & target & "' are:" & VbCrLf & tempvarMember
wscript.quit