Welcome to Lockergnome.com!
HomeHome FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

Extract/Export Drop Down List or Combo box Values from Use..

 
   Home -> Office -> User Forms RSS
Next:  User Forms: populating form fields from a single date  
Author Message
MSDN User - a rather VBA

External


Since: Jul 22, 2007
Posts: 1



(Msg. 1) Posted: Sun Jul 22, 2007 8:38 am
Post subject: Extract/Export Drop Down List or Combo box Values from UserForm
Archived from groups: microsoft>public>word>vba>userforms (more info?)

I was given a protected word forms which was built by a colleague who no
longer with the company. I am not sure how it was built, but when ran Visual
Basic (Alt + F11) on form, there was no code shows on VB editor, so I presume
it was built by toolbar form control.

Please help, if anyone have any idea on how to extract or export the
values/items of a Drop Down List and Combo Box to .txt or .xls? I can see the
values when right click on control's property, so in another words, at the
last, I would manually retype them. However my assignment is to redo the
whole form library, which contains approx 50 forms, each form has roughly
10-15 controls, and each control contains over dozen of list items...

Any help would be appreciated. Thank you.
Back to top
Login to vote
Doug Robbins - Word MVP

External


Since: Jul 14, 2006
Posts: 2538



(Msg. 2) Posted: Mon Jul 23, 2007 8:38 pm
Post subject: Re: Extract/Export Drop Down List or Combo box Values from UserForm [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

The following code will cause each of the entries in a dropdown formfield to
be displayed in a message box

Dim i As Long
With ActiveDocument.FormFields("DropDown1").DropDown
For i = 1 To .ListEntries.Count
MsgBox .ListEntries(i).Name
Next i
End With

You could use that method in a modification of the code in the article "Find
& ReplaceAll on a batch of documents in the same folder" at:

http://www.word.mvps.org/FAQs/MacrosVBA/BatchFR.htm

To go through each file and extract the entries into another document.
--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"MSDN User - a rather VBA newbie" <MSDN User - a rather VBA newbie
@discussions.microsoft.com> wrote in message
news:B5E02239-EEBB-4FAD-89AD-871D84C38B69@microsoft.com...
>I was given a protected word forms which was built by a colleague who no
> longer with the company. I am not sure how it was built, but when ran
> Visual
> Basic (Alt + F11) on form, there was no code shows on VB editor, so I
> presume
> it was built by toolbar form control.
>
> Please help, if anyone have any idea on how to extract or export the
> values/items of a Drop Down List and Combo Box to .txt or .xls? I can see
> the
> values when right click on control's property, so in another words, at the
> last, I would manually retype them. However my assignment is to redo the
> whole form library, which contains approx 50 forms, each form has roughly
> 10-15 controls, and each control contains over dozen of list items...
>
> Any help would be appreciated. Thank you.
>
>
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> User Forms All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Categories:
 General
 Microsoft Windows XP
 Microsoft Windows Vista
 Microsoft Windows (other)
  Microsoft Office
 Microsoft Office (other)
 Computer Security
 Linux
 Movies


[ Contact us | Terms of Service/Privacy Policy ]