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
Por tania81
#72345
Olá,

já tenho uma macro numa folha de folha de excel, mas o documento ainda está muito pesado. Para reduzir o tamanho do documento quero eliminar ao máximo formatações.

Numa das colunas tenho uma lista suspensa onde se tem de escolher sim ou não.
É possível "incluir a lista suspensa" na macro?

Também já tentei transformar parte do documento em tabela, mas depois a macro não corre bem e além do mais a formula não é copiada para a linha onde a macro correu. Se transformar todo o documento em tabela, a macro também não corre bem.

Muito obrigada!
Avatar do usuário
Por luizpaps
Posts Avatar
#72361
a macro abaixo cria uma lista com SIM e NÃO na célula selecionada
Código: Selecionar todos
Sub Listas()
    With Selection.Validation
        .Delete
        .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
        xlBetween, Formula1:="SIM,NÃO"
        .IgnoreBlank = True
        .InCellDropdown = True
        .InputTitle = ""
        .ErrorTitle = ""
        .InputMessage = ""
        .ErrorMessage = ""
        .ShowInput = True
        .ShowError = True
    End With
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