#31
|
||||
|
||||
To add more content control pairs, all you need do is run the AddControls macro - you don't need yet another macro to run that!!!
As for assigning a shortcut to the macro, see the first link in post #3 in this thread . However, I would recommend against trying to assign any pre-assigned Word shortcut keys, such as F8. Doing so can have unpredictable and undesirable effects. To see what the pre-assigned Word shortcut keys are, visit: https://support.office.com/en-us/art...2-f762f663ceb2
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#32
|
|||
|
|||
Quote:
Is it possible if the name doesn't have number(columm B), it only fills the name? Thank you |
#33
|
||||
|
||||
Try the attached template. Note that I've made some other changes to the code, too, so that it simply looks at the first worksheet in the workbook rather than looking for one named 'Folha1'.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#34
|
|||
|
|||
Quote:
But i'm getting the same error. If i have names in the first columm and no number in the second columm, it stop the macro with an error. I've attached my excel data for you try it out please. thank you |
#35
|
||||
|
||||
Try the attached. The problem was in having multiple blanks, which Word treats as duplicates (which aren't permitted).
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#36
|
|||
|
|||
Quote:
When i open, it gives me the error attchaed. But now the names without number appears too But when i select a name, it still gives me the error and doesn't show the number(the one how have numbers) Thanks |
#37
|
||||
|
||||
That error has nothing to do with any changes I made to the code (that part has remain unchanged for days) and suggests you're once again trying to do something contrary to how the code is designed to work. It is designed around being used to create one dropdown, from which an entry is selected and the controls are replaced by the text, before you create another dropdown from which an entry can be selected.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#38
|
|||
|
|||
Quote:
The macro is working perfectly well for the job is mean to tell me, is it possible to modify the macro so it only insert the dropdown and read only the first columm? I don't need the second columm. Thanks |
#39
|
||||
|
||||
What - you now want me to do a major re-write of the code because you've changed your mind?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#40
|
|||
|
|||
Quote:
The problem i've now it's that if i don't have nothing in Columm B, the macro stops and gives me an error. So, since i've persons with numbers and others without numbers, i can't use the macro I was just thinking, if i only use the columm A, i can put there names with numbers or without numbers ex: Columm A Joao n.º123456 Luis Paulo 123431 Helder In my opinion, it's more easy insert only a dropdown, select the name and keep writing. If i use the dropdown, select then i need to press mouse outside the dropdown to appear the number. That will reduce the speed of writing. With 1 columm and 1 dropdown, after pressing enter a just need to write without pressing the mouse. Hope you understand me now Thanks |
#41
|
||||
|
||||
The last revision I made to the template works fine with or without values in column B...
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#42
|
|||
|
|||
Quote:
The problem i found it's that i can't have the same name twice Ex: Columm A columm B joao santos 123456 pedro 232435 joao santos pedro |
#43
|
||||
|
||||
That's fairly normal...
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#44
|
|||
|
|||
There's nothing i can do?
Because in one class i have students with the same name and surname Thanks |
#45
|
||||
|
||||
If they're identical, what does it matter that the dropdown only lists one? Surely the same choice would do for either? If not, how would you tell them apart when choosing from the dropdown so you know which one to pick? The alternative (provided they have different values in column B), would be to have both the column A & column B data appear for the dropdown selection.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Changing keyboard layout - Changing/removing keyboard shortcut | Hans L | Windows | 2 | 08-16-2015 05:33 PM |
keyboard shortcut | ilor | OneNote | 1 | 11-13-2014 02:48 PM |
disable ctrl+space excel keyboard shortcut | melvinjn | Excel | 2 | 11-27-2013 04:11 AM |
Keyboard shortcut for bookmarks | Jennifer Murphy | Word VBA | 1 | 01-06-2013 07:38 PM |
Outlook Keyboard shortcut | sostrow28 | Outlook | 1 | 12-10-2010 05:57 AM |