Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...This has been the MOST helpful forum that I have been a part of and I want to say thank you. The tips, tricks and helpful advice that you all contribute to have been lifesavers in many instances..."

Geography

Where in the world do Tek-Tips members come from?
10041967 (Programmer)
8 May 12 7:34
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
UnsolvedCoding (TechnicalUser)
8 May 12 9:12
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.

 
10041967 (Programmer)
8 May 12 9:41
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...
UnsolvedCoding (TechnicalUser)
8 May 12 10:15
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.
fumei (TechnicalUser)
10 May 12 2:12
I think you need to post some code.

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

Quote:

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.

10041967 (Programmer)
10 May 12 10:29

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.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close