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

In VBE mode With your Userform selected and your Toolbox visible,
right-click on a blank area of the toolbox, select more options... Scroll
down to Microsoft Excel Spreadsheet, Your version? and select it.
The icon should now be a part of your toolbox; Click on it and drag it to
your Userform.
HTH
Jim May

"Tom Ogilvy" wrote in message
...
you could use copyaspicture to copy the range and display it in the
userform.
Stephen Bullen has documented the procedure to do it with a chart, but is
should be adaptable to using a picture of the range:

http://www.oaltd.co.uk/Excel/Default.htm

--
Regards,
Tom Ogilvy


"Trefor" wrote:

Ardus,

Many thanks for the reply, not quite what I was hoping for, I have a
table 2
tables each 2 x 20 cells, not sure that I fancy coding up 80 text boxes
and
then presumably fixing up the colours afterwards. Thanks anyway, I will
try
and think of a plan B.

--
Trefor


"Ardus Petus" wrote:

You will have to define one TextBox per cell to display

HTH
--
AP

"Trefor" a écrit dans le message de
...

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