View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rob Wills Rob Wills is offline
external usenet poster
 
Posts: 18
Default TextBox Change/Exit problem

apologies for my syntax errors...

but something like this should work

dim ctrl as Control
dim blnOpt
blnOpt = true

for each ctrl in Userform.Controls
if left(ctrl.name,3) = "Opt" then
if ctrl.value then
blnopt = true
end if
end if
next ctrl

if not(blnOpt) then
'Cancel form exit
end if