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
Avatar do usuário
Por Mafalda
Posts Avatar
#17434
Olá!
Possuo pasta de trabalho com dezenas de nomes e gostaria de extrair Relação dos Nomes (Gerenciador de Nomes) em planilha, mas não encontrei solução (VBA). Por favor, alguém ajude?
Abraços.
Avatar do usuário
Por gfranco
Avatar
#17435
Boa noite

Cole o código num módulo e execute numa planilha vazia...


Sub nomes_dos_nomes()
On Error Resume Next
Dim i As Long

For i = 1 To 100
ActiveSheet.Cells(i, 1) = ThisWorkbook.Names(i).Name
ActiveSheet.Cells(i, 2) = ThisWorkbook.Names(i)
Next
MsgBox "concluido"

End Sub
Avatar do usuário
Por alexandrevba
Avatar
#17436
Boa noite!!

Veja em:
https://www.vbatricksntips.com/list-all-name-range.html
Código: Selecionar todos
Sub List()

Dim nRng As Name
' Author: Dreams24
' Written for VBA Tricks and tips blog
' https://www.vbatricksntips.com

    Sheet1.Cells(1, 1).Value = "Name"
    Sheet1.Cells(1, 2).Value = "Range"
    
    i = 2

' Loop through all Name ranges in workbook
    For Each nRng In Names
        Sheet1.Cells(i, 1).Value = nRng.Name
        Sheet1.Cells(i, 2).Value = nRng
        i = i + 1
    Next nRng

    MsgBox "All named ranges listed successfully", vbInformation

End Sub
Leia:
http://chandoo.org/wp/2010/09/20/show-all-names-excel/

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