Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

clear macros from dropdown in word 2003

Status
Not open for further replies.

10041967

Programmer
May 8, 2012
3
PT
Hi, everyone

I'm very new and i have a question if someone please can help...

I have a dropdown listbox in a Word 2003 doc.
There are already some macros visible in the dropdown window to assign when entering or exiting the dropdown.

Is there a way to clean all marcos visible? Is that i can't make it assume other new macros.
Also when the user clicks the dropdown it doesn't triggers the macro in vba ...only did it once.

Can you help?

Thanks a lot
 
If you simply mean not include the name in a drop down box that you made then simply change the data that gets pulled into the box by remove the macro name from the list.

If you mean can you remove the names from the list of macros the answer is both yes and no. If you don't want a macro to show in a macro list you have to do something like find a way to make the macro a private sub.

Since you indicate you are very new, that means instead of saying Sub Do_Something() it would be Private Sub Do_Something().

However you need to keep in mind that if you make something Private there are limits on what can access the sub. In general, You can't call something private and allow several modules to access it, keep it in the module where you want to use the sub.

 
Thanks UnsolvedCoding

I already made some macros disappear by renamming them private. Some don't exist anymore and still apear in the box?!!!
What bothers me is that my main macro which remains simply not private doesn't activate itself when the user clicks the dropdown list even with the checkbox "calculate on exiting", checked ('don't know if theses are the apropriate words because i have a Portuguese version and i'm translating'). Strange because it worked at first.
I have a feeling i'll have to remake a knew dropdown to make it accept the macro...
Is there anyway else to make this more simple?
Sorry to insist...
 
Not really.

If the macro's are changed and the change doesn't hold then its either an incorrect change or a refresh of some sort is in order.
 
I think you need to post some code.

Also I think you had better detail what kind of dropdowns youae using

I already made some macros disappear by renamming them private. Some don't exist anymore and still apear in the box?!!!
Just because they are renamed does not affect what you have listed in the box. How are you putting the names in the dropdown in the first place? Rememeber the "names" you put in the dropdown are strings, not the macros themselves.

You need to give more details.

 
I'm still testing my code and doing it bit by bit cause don't have much time, so it's still not worth it to show the code because of many bugs to correct.
Of course i'm not speaking about strings within the added items in the dropdown listbox but yes about the macros that apear as executable when opening the dropdown window in Word2003.
Anyway the suggestions of both UnsolvedCoding and fumei already helped me and i think the problem is that i used to different worsheets with the dropdown listbox copied with the same macro names and maybe it has confused the machine even though working with only one of the two opened documents at at time.
As i'm starting my code i think i'l make all it over again with different names.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top