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
#37848
Galera, estou usando uma macro vinculada a um CommandButton Click. Entretanto, quando chega em Range ("A5").Select, ele me solicita depurar. Não consigo identificar o que falta no comando para funcionar corretamente.

O engraçado que quando executo o mesmo comando através de módulo funciona perfeitamente. Conseguem me ajudar?


Private Sub CommandButton2_Click()
'
' GERAR_PROPOSTA Macro
'

'
'Seleciona, copia e cola em uma nova planilha e ordena por modelo, TP e preço
Range("A64").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
Sheets.Add After:=ActiveSheet
Range("A5").Select
ActiveSheet.Paste
Cells.Select
Cells.EntireColumn.AutoFit
Columns("H:H").Select



Neste comando dá certo.


Sub GERAR_PROPOSTA()
'
' GERAR_PROPOSTA Macro
'

'
'Seleciona, copia e cola em uma nova planilha e ordena por modelo, TP e preço
Range("A64").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
Sheets.Add After:=ActiveSheet
Worksheets.Select
Range("A5").Select
ActiveSheet.Paste
Cells.Select
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