Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Missing info on worksheet BCalaway Excel Worksheet Functions 0 April 27th 09 04:07 PM
Pivot - top 10 stocks & missing info Christine[_3_] Excel Worksheet Functions 1 October 15th 08 05:34 PM
Missing info in Formula Tab SOS Excel 2007 Excel Discussion (Misc queries) 6 September 29th 07 04:19 PM
Legend Missing Info Debra Ann Charts and Charting in Excel 0 October 11th 05 03:23 PM
VBA Challenge - Flag Missing Info Frank Kabel Excel Programming 0 July 21st 04 08:04 PM


All times are GMT +1. The time now is 06:46 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"