View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
James James is offline
external usenet poster
 
Posts: 542
Default Dynamic userform help - Data Validation

thanks for the reply but that is what i was trying to explain. it is a
dynamic userform, therefore there is just a form with 8 pages on a multipage
control. No textboxes or comboboxes. they get populated later based on
selections.

does anyone know how to write code that "writes code" so on creation of a
new texbox or combobox it places:

Sub Textbox(i)_Change()
validation_function
end sub

Would that work? Im not sure?


"Patrick Molloy" wrote:

there's CHANGE as well as key press, key down and so on
double click the text box and it will take you to the default event. th
elist where you see 'change' will show what elese is available.

"James" wrote:

I have a dynamic userform that has a multipage on it. Each page of the
multipage gets populated with labels, textboxes and comboboxes. I need to
know how to go about doing some data validation. ie. some boxes will have
just numbers, just text, text and numbers or date. I need to set an input
mask for each textbox or combo, and its not easy because the names of the
controls will change each time depending on options selected. I have set the
tag values for each as well so maybe i can use those for something. I dont
know of an event that fires when any textbox changes. Any help would be great
thanks.