Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50068

Applying code for different columns

$
0
0
Hello,

The following code is a code that was firstly used for Columns from 1 till 44

Code:

Private Sub LoadRow(row)
For Column = 1 To 44
  Controls("C" & Column) = Cells(row, Column)
  Controls("C" & Column).Locked = True
Next
End Sub

Now, I would like to only apply this code for Columns: 1, 2, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 38, 39, 40, 41, 43, 44

Could someone help me on this??

Thank you very much

Regards

Viewing all articles
Browse latest Browse all 50068

Trending Articles