PDA

View Full Version : Solved: Fonts to shapes? Possible?



hunsnowboard
02-06-2009, 12:22 PM
Hi there Everyone! Please provide me with a solution with this problem.

I have a VBA code which depending on a value returns a font letter in "G3". Actually this font I am using is a pie chart font. For example if the value is 0.5 which is 50% then returns a small pie chart which shows circle half black and half white. It is a good visualization of the value. My problem is that I would like to run this macro on many computers - and here is the catch - not everybody has this font installed, so they are not able to see these mini pie charts. Is it possible to make these fonts to be shapes and then insert them in cell "G3" based on the value? My problem is that I have never worked with shapes... I do not even know how to handle them! :( Please help me and advice what to do.

Here are the relevant lines of my code:


Select Case aRowFraud / aRowAll
Case 0
Range("g3").Value = "A"
Case 0.001 To 0.05
Range("g3").Value = "B"
Case 0.0501 To 0.1
Range("g3").Value = "C"
Case 0.0101 To 0.15
Range("g3").Value = "C"
Case 0.0151 To 0.2
Range("g3").Value = "D"
Case 0.0201 To 0.25
Range("g3").Value = "E"

'and this code goes on till Case 1

End Select

hunsnowboard
02-07-2009, 01:43 AM
Someone please help! :(

mdmackillop
02-07-2009, 07:37 AM
You could create JPGs in Paint, but I don't know about creating Shapes from them.

hunsnowboard
02-07-2009, 07:44 AM
Hi Mdmackillop! Thank you for both of your messages. Anyway, if I create jpgs can I use them in the macro to paste them?

mdmackillop
02-07-2009, 07:48 AM
Just record a macro using Insert Picture.