+ Reply to Thread
Results 1 to 2 of 2

Case Statement-smart form

  1. #1
    Registered User
    Join Date
    02-05-2008
    Posts
    3

    Case Statement-smart form

    I'm very new to vba coding. I think I need a case statement to make a "smart form". Basically, I want to make certain columns be mandatory to fill out based on the selection from one cell.

    If cell A5 says "Change" (value is based on a data validation list), I want columns B, C, D, E, & I to be mandatory (ie the file cannot be saved until they have been populated). Of course, it could be only 5 rows or upto 7000 rows, depending on the user.

    If cell A5 says "New", I want columns B, C, F, & G to be mandatory. Again, the number of rows will depend on the user.

    Any help would be greatly appreciated!
    --Michele

  2. #2
    Forum Contributor pr4t3ek's Avatar
    Join Date
    10-13-2008
    Location
    Melbourne, Australia
    MS-Off Ver
    2003 & 2007, 2010
    Posts
    483

    Re: How to Write a Case Statement

    well this is more complicated than a simple case statement, but in regards to a case statement, see this link. http://www.ozgrid.com/VBA/select-case.htm
    --
    Regards
    PD

    ----- Don't Forget -----

    1. Use code tags. Place "[code]" before the first line of code and "[/code"]" after the last line of code. Exclude quotation marks

    2. Thank those who have helped you by Clicking the scales above each post.

    3. Please mark your post [SOLVED] if it has been answered satisfactorily.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1