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.
#21765
Pessoal, bom dia.

Não estou conseguindo eliminar o uso de SELECT num trecho de código para copiar um range de uma sheet e colar em outra, e isto está gerando erro quando oculto a sheet na qual é realizado o SELECT.

Segue o código
Código: Selecionar todos
    With .Sheets("Departamentos")
        ultLin = .Cells(Rows.Count, "A").End(xlUp).Row
        .Range("A1" & ":D" & ultLin).Copy
    End With
    
    With .Sheets("Validações")
        Planilha = .Name
        .Select
        .Range("D1").Select
        .Paste
    End With
Agradeço a quem der uma luz para a solução deste problema.
#21767
Experimente:
Código: Selecionar todos
Sub teste()
 Sheets("Departamentos").Range("A1:D" & Cells(Rows.Count, 1).End(3).Row).Copy Sheets("Validações").Range("D1")
End Sub
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