View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default Same task for Multiple fields

"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.




In article ,
WLMPilot wrote:

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