View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Trefor Trefor is offline
external usenet poster
 
Posts: 201
Default Is it possible to display worksheets cells in a userform


I have a worksheet that has some text and formula in a table. I have also
used conditional formatting in the table to give be different colour
depending on the results in some of the cells.

I would like to take the entire table including all the colur formatting and
display if in a User form, is this possible?

I have tried:

myuserform.mytextbox.Value = Workbooks(myWorkbook).Range("MyRange").Value

If MyRange equals a single cell then it works fine, but if MyRange covers
more than one cell I get an error Run-time error -2147352571 (80020005)
Could not set the Value property. Type mismatch.

I also tried:

myuserform.mytextbox.Text = Workbooks(myWorkbook).Range("MyRange"). Text

and this does not error, but it only display the first cell in a column of
three values.

In either case all formatting appeared lost as I simply ended up with plain
text in the Userform.

--
Trefor