Posted to microsoft.public.excel.programming
|
|
Is it possible to display worksheets cells in a userform
The Range object also has a CopyPicure method.
--
Tim Williams
Palo Alto, CA
"MilkmanDan" wrote in message
...
I'm in pretty much the exact same situation....
I have several tabs of tables with summary data that indicates state
with conditional formatting, and in building a VB front end I want to
display those tables in userforms with the conditional formatting.
Looking through the suggestions I've seen here and elsewhere, it really
seems that Bullen's approach seems like it's the right direction. As
for modifying it to work on a spreadsheet range instead of a
chart.....can anyone help me figure out how to do that? (been searching
and not feeling like I'm getting closer"). Here's the code from
Bullen's example......
Code:
--------------------
Private Sub UpdateChart()
Dim oCht As Chart, lPicType As Long
'Find the chart object on the sheet
Set oCht = Sheet1.ChartObjects(1).Chart
'Recalculate the sheet to give us a new set of random points
Sheet1.Calculate
'Do we want a metafile or a bitmap?
'If doing a 1 to 1 copy, xlBitmap will give a 'truer' rendition.
'If scaling the image, xlPicture will give better results
lPicType = IIf(obMetafile, xlPicture, xlBitmap)
'Update the chart type and copy it to the clipboard, as seen on screen
With oCht
.ChartType = iChartType
.CopyPicture xlScreen, lPicType, xlScreen
End With
'Paste the picture from the clipboard into our image control
Set imgChtPic.Picture = PastePicture(lPicType)
End Sub
--------------------
--
MilkmanDan
------------------------------------------------------------------------
MilkmanDan's Profile: http://www.excelforum.com/member.php...o&userid=34538
View this thread: http://www.excelforum.com/showthread...hreadid=533369
|