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.
#64446
Uso uma macro que cria caixas de seleção e ela funciona muito bem. Agora preciso que ao criar a caixa de seleção ela já venha "chamando" uma macro, ou seja, ao invés de clicar com o botão direito em mil caixas de seleção e atribuir a macro de ordenar para cada uma delas eu gostaria de já criar a caixa de seleção com a macro atribuída a elas.
Código para criar a caixa de seleção:
Código: Selecionar todos
'retirado de https://br.ccm.net/faq/19796-como-criar-automaticamente-caixas-vinculadas-as-celulas-abaixo-no-excel
Sub Inserer_Caixas_de_Seleção_Vinculadas()
Dim rngCel As Range
Dim ChkBx As CheckBox
For Each rngCel In Selection
  With rngCel.MergeArea.Cells
    If .Resize(1, 1).Address = rngCel.Address Then
       Set ChkBx = ActiveSheet.CheckBoxes.Add(.Left, .Top, .Width, .Height)
      With ChkBx
        .Value = xlOff
        .LinkedCell = rngCel.MergeArea.Cells.Address
        .Text = ""
        With .Border
        End With
      End With
    End If
  End With
Next rngCel
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