I don't think that's not really relevant, they are just consecutive cells! But if you want it:
ThisWorkbook.Worksheets("sheet1").Cells(6, 1)
ThisWorkbook.Worksheets("sheet1").Cells(6, 2)
ThisWorkbook.Worksheets("sheet1").Cells(6, 3)...
I'm not exactly sure what you mean. But I'll try to clarify.
I have an excel worksheet with 2 to 10 names. When I open up the userform I want it to only to display the names in the worksheet.
To each name corresponds:
1 Label with the name,
1 optionbutton,
1 checkbox,
1 spinbutton and...
I forgot to mention that the control objects are in a UserForm.
There are 10 CheckBoxes, 10 OptionButtons, 10 TextBoxes, 10 SpinButtons and 20 labels. I do not want to call each of them at once, but in order, linked to a cell, hence the for loop.
Example: If cell 1 in the worksheet is empty, I...
I would like to select control items in a For loop. For example:
For i=1 to 10
If ThisWorkbook.Worksheets("sheet1").Cells(6, i)= "" Then
TextBox(i).Enabled = False
next i
Of course the TextBox(i) call is wrong, how can I select the controls in a loop so I do not have...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.