Reordering part of a list with VBA

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I've got a handful of issues to work through with a particular project
I'm working on but let's start with the first: reordering part of a
list with VBA.

I have a list on a hidden tab (let's be adventurous and call it the
"List" tab) which prepopulates a drop-down list for data entry on
another tab (the "Entry" tab, shocking!). However, a user has the
option of entering a value not on the drop-down menu, if need be. I've
got a Worksheet_Change function that will append this new value to the
bottom of the list, which of course means it now appears on the drop-
down menu. So far, so good, except I would like to resort the list by
alpha after appending the new record.

"Aha! Easy!" you say, but not so fast. There's a catch - I always want
two values ("N/A" and "<Enter New Item>") to be at the very bottom of
the menu.

Sooooo, how do I take a list, append a record to it, and then resort
it, except the records that were formerly the last and second-to-last
- so as to keep them at the bottom of the new list? I can come up some
brilliantly convoluted ways of doing this, but hopefully there's
something simpler.

Thanks!

..o.

.



Relevant Pages

  • Re: Open txt file and replace TAB with coma
    ... Consult your VFP HELP and search for: ... double quote and when I used append delimited TAB doesn't work well. ... I used text edit open file and replace TAB with coma after that I able ...
    (microsoft.public.fox.vfp.forms)
  • Re: Open txt file and replace TAB with coma
    ... I used text edit open file and replace TAB with coma after that I able to append with any problem. ...
    (microsoft.public.fox.vfp.forms)
  • Open txt file and replace TAB with coma
    ... I received a txt file that has tab as delimiter but not all fields has double quote and when I used append delimited TAB doesn't work well. ... I used text edit open file and replace TAB with coma after that I able to append with any problem. ...
    (microsoft.public.fox.vfp.forms)
  • Re: Prohibit record advance on "TAB"
    ... tab and change the Cycle parameter to Current Record. ... happens without any notice and I'm afraid my users will append a record they ... I'd like to make it so that, as a user TABS, ...
    (microsoft.public.access.forms)
  • Re: Success! Re: Cascading paragraphs
    ... I'm suspecting that any version of Word that has the tab ... In fact, trying to draw the ... >> to Format Autoshape. ... space between them at the bottom of the page. ...
    (microsoft.public.word.newusers)