Jump to content
Fórum Script Brasil
  • 0

Preenchimento com gradiente


Awq

Question

Olá a todos!

Bem, eu tenho várias textbox, e dependendo do valor da célula R2, R3 e/ou suas subsequentes, eu vou preencher as textbox com determinadas cores.

Se for 1, vai ser com a cor azul,se for 2, vai ser com um gradiente e, se for 3 vai ser com verde.

Pra preencher com verde e azul eu consegui.

Agora eu quero que preencha o gradiente com o azul e o verde, de cima pra baixo.

Tá assim o código:

Sub preenche()


Dim i As Integer
Dim y As Integer

For y = 2012 To 2014
    For i = 1 To 2
        'Tabela de valores começa na célula R2
        Select Case ActiveSheet.Cells(i + 1, 18).Value
            Case 1:
            ActiveSheet.Shapes("GOV_" & y & i).Fill.ForeColor.RGB = RGB(0, 51, 102)
            Case 2:
            ActiveSheet.Shapes("GOV_" & y & i).Fill.GradientColorType???
            Case 3:
            ActiveSheet.Shapes("GOV_" & y & i).Fill.ForeColor.RGB = RGB(0, 122, 55)
        End Select
    Next i
Next y


End Sub

Então, é isso. Só falta essa parte.

Obrigado a todos!

Edited by Awq
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.1k
    • Total Posts
      651.9k
×
×
  • Create New...