View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Toppers Toppers is offline
external usenet poster
 
Posts: 4,339
Default Random Text in a userform textbox

Hi,
Something like this? Put in "Userform_Initialize" routine

Set rng = Range("A1:B1,B3,C5,B8,C10")
mystr = ""
For Each cell In rng
mystr = mystr + cell.Value & " "
Next
textbox1.Text = mystr

"Soniya" wrote:

Hi All,

Is it possible to display random text from a range of cells in a
userform textbox when the userform is activated?

Also if the range refers to non contiguous cells.

Thanks