Same task for Multiple fields

  • Thread starter Thread starter WLMPilot
  • Start date Start date
W

WLMPilot

In a macro, I know you can DIM muiltiple fields to same format, but can you
do the same for labels, textboxes, etc., on a userform, ie Label1.Visible,
Label2.Visible = TRUE?

Thanks,
Les
 
"Dim" declares variables (as types, if they are included), but doesn't
assign "format". Some types have default values (e.g., a variable of
type Long will be initialized with the value 0 and a variable of type
Boolean will be initialized with the value False)

Labels and Textboxes are objects. Objects have properties, such as the
..Visible property. Properties have default values as well.

Unless the objects belong to a Collection that allows the assignment of
properties for all elements of the collection (e.g., Cells.Font.Bold =
True), which Labels do not, you need to assign property values
individually.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top