Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA Challenge - Flag Missing Info
This will work but you need to enhance if the form contains Frames or Multipage controls. dim itm as variant, bFlag as boolean for each itm in array ("CheckBox1", "CheckBox3") with me.controls(itm) if .value=0 then .backcolor=vbred if not bflag then .setfocus bFlag=true else .backcolor=vb3dface endif end with next if not bflag then 'can exit end if Instead of using the array as described above, you could create 1 or more collections of controls in your forms initialize event. OR put similar controls in a frame.. OR use the .TAG property to mark it as Critical. -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam V-Man wrote : Hi all, I have a userform with various fields. Some fields are essential for a user to fill out. Before a user saves the form, I want to be able to flag the critical fields (maybe change their color) that have not been completed and generate a message which indicates the specific fields that need information. This is similar to when you fill out an application online and the missing info is highlighted before you can continue. I can give more details if you need! Thanks, V-Man |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Missing info on worksheet | Excel Worksheet Functions | |||
Pivot - top 10 stocks & missing info | Excel Worksheet Functions | |||
Missing info in Formula Tab | Excel Discussion (Misc queries) | |||
Legend Missing Info | Charts and Charting in Excel | |||
VBA Challenge - Flag Missing Info | Excel Programming |