VBA- inserting multiple cell values into single textbox
Slight typo...
Dim rngmyrange As Range
'Change the sheet name to the relevant sheet
Set rngMyRange = ActiveWorkbook.Sheets("Sheet1").Range("A1")
'change dialogsheets(1).editboxes(1) to represent your userform and
text box names...
DialogSheets(1).EditBoxes(1).Text = rngMyRange.Offset(0, 0) &
rngMyRange.Offset(0, 1) & rngMyRange.Offset(0, 2) &
rngMyRange.Offset(0, 3)
' you might want to add in some spaces or commas ..
'rngMyRange.Offset(0, 0) & ", " & rngMyRange.Offset(0, 1) etc...
|