Consulting

Results 1 to 5 of 5

Thread: Solved: Fonts to shapes? Possible?

  1. #1

    Solved: Fonts to shapes? Possible?

    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

  2. #2
    Someone please help!

  3. #3
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    You could create JPGs in Paint, but I don't know about creating Shapes from them.
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  4. #4
    Hi Mdmackillop! Thank you for both of your messages. Anyway, if I create jpgs can I use them in the macro to paste them?

  5. #5
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Just record a macro using Insert Picture.
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •