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
#15319
Amigos gostaria de usar o Range ao invés de passar posicionamento A1:E10 eu preciso controlar o posicionamento com variáveis Range(Cells(lin, col): Cells(lin,col))

Ou exite outra possibilidade de eu capturar A1, A2, B34, D19 ... X99 com o Cells(lin,col), por exemplo
lin = 1
col = 1
posicao = Cells(lin, col)

variável posição com valor A1

Fico no aguardo
#15320
Bom dia!!

Eu não entendi muito bem o que deseja, mas veja as fontes e exemplos...
Código: Selecionar todos
'Fontes:
'http://www.excel-easy.com/vba/range-object.html
'http://www.homeandlearn.org/the_cells_property.html
Sub TesteI()
Dim Copyrange As String
Startrow = 1
Lastrow = 11
    Let Copyrange = "A" & Startrow & ":" & "D" & Lastrow
    Range(Copyrange).Select
End Sub
Código: Selecionar todos
Sub TesteII()
   For iLin = 1 To 5
        For iCol = 1 To 5
            Cells(iLin, iCol) = "Linha " & iLin & "   Coluna " & iCol
        Next iCol
   Next iLin
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