Este fórum está sendo desativado

Depois de 9 anos, este fórum será desativado. Mas calma.... estamos migrando para uma comunidade no DISCORD. Junte-se a nós.

ENTRAR PARA DISCORD

Tópicos relacionados a códigos VBA, gravação de macros, etc.
  • Avatar do usuário
  • Avatar do usuário
Avatar do usuário
Por Paduan
Avatar
#1885
Boa tarde a todos! Estou precisando de uma macro excel que que faça o seguinte: Fiz uma imagem no CorelDraw na forma de uma arcada dentária e exportei em Windows Metafile (.wmf). Inseri na Plan1 e desagrupei, assim consegui todos os dentes como Shapes. Preciso que ao clicar em uma das shapes (dentes) ela mude de cor e me retorne um valor. E possível? Podem me ajudar? Obrigado e parabéns pelas suas aulas, acompanhe todas.
Avatar do usuário
Por alexandrevba
Avatar
#1889
Boa tarde!!

O objeto é realmente um shape.
Código: Selecionar todos
Option Explicit


Sub SeuShapeParaExcel_e_Shape()
    
    Dim Shp As Shape
    
    Set Shp = ActiveSheet.Shapes(Application.Caller)
    With Shp
        If .Fill.ForeColor = 192 Then
            .Fill.ForeColor.RGB = RGB(0, 176, 80)
        Else
            .Fill.ForeColor.RGB = RGB(192, 0, 0)
        End If
    End With
End Sub
Att
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]

Estamos migrando para uma comunidade no Discord