Consulting

Results 1 to 9 of 9

Thread: Need help to setup restriction (countries) on an already existed VBA

  1. #1

    Need help to setup restriction (countries) on an already existed VBA

    Hi,

    I recently got a project to enhance a new field to restrict some countries from an invoice. For setting up restriction for certain matters, is it better to set a table and list out all of the countries that I want to include, and the one that is left out, then I want to restrict them?

    I don't have the data with me because the data will extract out from another database that I don't have access to. My role now is only to put a restriction tool in the form so when the data entry people run the form, it can restrict them from entering data from the countries that is restricted by the company.
    PS: since I can't post an attachment on this thread, the restriction data I am planning to have is listed like below, please teach me how I can have the code look up to the worksheet placed on the desktop (later on I will put this file on the share folder with the vba and form). what I want to do is to put a restriction warning if the data entry person enter an restriction country, then it will not help them process the invoice into the database. Please advice.

    Countries
    India
    Nigeria

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    A list of countries doesn't really help much. But yes, a list of included countries is better than excluded.

    When you can post the actual workbook with the invoice etc., that will be more helpful.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    I have attached the screen shot, and I would like to add a dropbox to list out the country included. Are there anyway I can have a list of un-restricted countries? Please demonstrate. Thanks

    Later on, I would want to add a date field that will automatically send out a reminder email to the customer saying it's time to make a payment.

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Very pretty!

    Seriously, pictures and words make for an interesting view, but I doubt many of us want to setup your workbook from scratch.

    The workbook, with your current code, would be far more helpful.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5
    I have attached the code with the userform under .sln file. Please let me know. Thanks

  6. #6
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    I can't load that in VS2010.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  7. #7
    I am using MS VB express, would this cause problem opening it? How should I upload the file so that you can view it?

  8. #8
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Not sure, I haven't used VB Express for a few years, shouldn't here be a proj file and some cls and/or frm files as well?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  9. #9
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •