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
#1551
Boas feras.
Estou anexando uma planílha e peço um help para o seguinte problema:
Quero imprimir todo o conteúdo que tenha dados na folha porém só quero zebrar a partir da linha 5 pra baixo e esta zebrando tudo.
No aguardo.
Você não está autorizado a ver ou baixar esse anexo.
Por duds
Posts
#1557
Boa tarde Jean,

A área que você comenta que não quer que seja zebrada deve ficar em cinza escuro, correto??

Att.
#1562
Bom dia Duds.
Na verdade essa área eu não preciso mexer em nada. Será o cabeçalho. Alem disso ele esta tirando a mescla das células do cabeçalho.
#1564
Bom dia!!

Tente algo assim....
Código: Selecionar todos
Sub AleVBA_308()
    Dim rng As Range, i
    Dim DataRange As Range
    Dim LR As Long
    
    LR = Range("A" & Rows.Count).End(xlUp).Row
    
    On Error Resume Next
    Set DataRange = Range("A5:F" & LR)
    Set rng = DataRange
    For i = 1 To rng.Rows.Count
        If i Mod 2 = 0 Then
            rng.Rows(i).Interior.ColorIndex = 16
        End If
    Next
End Sub
#1566
Obrigado alexandre. Resolveu!
Só anulei a parte abaixo do código e ficou do jeito que eu queria.
Parte anulada:
'With Selection
' .HorizontalAlignment = xlCenter
' .VerticalAlignment = xlBottom
' .WrapText = False
'.Orientation = 0
'.'AddIndent = False
' .IndentLevel = 0
' .ShrinkToFit = False
'.ReadingOrder = xlContext
'.MergeCells = False
'AJUSTAR AUTOMATICAMENTE AS COLUNAS
'Columns("A:I").EntireColumn.AutoFit

' End With
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