srinivas_vemla
asked on
MS Word VBA Listbox visible property
Hello Friends,
I could not find a forum where I could place this question and this was the closest.
I want to hide a listbox item in MS Word Form using VBA, but I don't see any visible property for the Listbox. Any roundabouts?
Regards,
Srinivas
I could not find a forum where I could place this question and this was the closest.
I want to hide a listbox item in MS Word Form using VBA, but I don't see any visible property for the Listbox. Any roundabouts?
Regards,
Srinivas
AFAIK you cant 'hide' individual rows in the standard ListBox, you can only add or remove them.
ASKER
I want to hide the whole listbox. Not a single item in the listbox. Any way to do that in VBA?
Yes. In VBA code use Me.YourLisboxName.Visible = False
ASKER
I checked my original question just now. Sorry for phrasing it badly.
I want to hide the listbox "control" (not an item in it) as a whole, but I don't find any property for that. Any suggestions?
I want to hide the listbox "control" (not an item in it) as a whole, but I don't find any property for that. Any suggestions?
There should be a .Visible property in every control. If you don't see it in a Properties dialog, try setting it programmatically and see what happens.
ASKER
The "Visible" property does not seem to be a part of ListBox control in MS Word VBA. I checked that and it gives me an error as no such property.
I recommend creating a 20-pt 'linking' question in the Word TA, with the URL from this question copy/pasted, so the Word experts can take a crack at providing you a soluition.
Howdy.
jimhorn is right on track, srinivas_vemla. If you enter code in a Command button or in UserForm.Activate "ListBox1.", it doesn't have "Visible"? I see it using Word VBA with Office 2000 and Win2k Pro.
jimhorn is right on track, srinivas_vemla. If you enter code in a Command button or in UserForm.Activate "ListBox1.", it doesn't have "Visible"? I see it using Word VBA with Office 2000 and Win2k Pro.
to clarify...
you want to use the listbox in the MS word form (i.e. a document) or on an MS Word Userform?
you want to use the listbox in the MS word form (i.e. a document) or on an MS Word Userform?
ASKER
a document dmang, not a userform
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks edwardiii,
This surely works for me...
Thanks,
Srinivas
This surely works for me...
Thanks,
Srinivas