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
Por headway123
Posts
#35115
Olá, estou desenvolvendo essa planilha VBA para cadastro de clientes

E ao inserir o TextBox/ComboBox da coluna 32 em diante, o Excel vba apresenta o seguinte erro:


Erro em tempo de execução '380'

Invalidy property value



Já conferi todo o código, e não encontrei nada de errado.

É só inserir mais um campo no userform, que ele aparece este erro.

Se alguém puder me ajudar, fico grato.

Obrigado!
Avatar do usuário
Por wesleyribeiro123
Posts Avatar
#35150
headway123
Boa tarde,

Fica muito complicado tentar lhe ajudar sem conseguir enxergar a base...
Por headway123
Posts
#35166
Sub Atualizar_Registros3()
'On Error Resume Next
Dim Item As ListItem
Dim LinhaFinal As Integer
Dim i As Integer

Frm_Prosp.listMenbro.ListItems.Clear

LinhaFinal = Plan4.Cells(Rows.Count, 1).End(xlUp).Row

For i = 2 To LinhaFinal

Set Item = Frm_Prosp.listMenbro.ListItems.Add(Text:=Plan4.Cells(i, "a"))
Item.SubItems(1) = Plan4.Cells(i, "b")
Item.SubItems(2) = Plan4.Cells(i, "c")
Item.SubItems(3) = Plan4.Cells(i, "d")
Item.SubItems(4) = Plan4.Cells(i, "e")
Item.SubItems(5) = Plan4.Cells(i, "f")
Item.SubItems(6) = Plan4.Cells(i, "g")
Item.SubItems(7) = Plan4.Cells(i, "h")
Item.SubItems(8) = Plan4.Cells(i, "i")
Item.SubItems(9) = Plan4.Cells(i, "j")
Item.SubItems(10) = Plan4.Cells(i, "k")
Item.SubItems(11) = Plan4.Cells(i, "l")
Item.SubItems(12) = Plan4.Cells(i, "m")
Item.SubItems(13) = Plan4.Cells(i, "n")
Item.SubItems(14) = Plan4.Cells(i, "o")
Item.SubItems(15) = Plan4.Cells(i, "p")
Item.SubItems(16) = Plan4.Cells(i, "q")
Item.SubItems(17) = Plan4.Cells(i, "r")
Item.SubItems(18) = Plan4.Cells(i, "s")
Item.SubItems(19) = Plan4.Cells(i, "t")
Item.SubItems(20) = Plan4.Cells(i, "u")
Item.SubItems(21) = Plan4.Cells(i, "v")
Item.SubItems(22) = Plan4.Cells(i, "w")
Item.SubItems(23) = Plan4.Cells(i, "x")
Item.SubItems(24) = Plan4.Cells(i, "y")
Item.SubItems(25) = Plan4.Cells(i, "z")
Item.SubItems(26) = Plan4.Cells(i, "aa")
Item.SubItems(27) = Plan4.Cells(i, "ab")
Item.SubItems(28) = Plan4.Cells(i, "ac")
Item.SubItems(29) = Plan4.Cells(i, "ad")
Item.SubItems(30) = Plan4.Cells(i, "ae")
Item.SubItems(31) = Plan4.Cells(i, "af")
Item.SubItems(32) = Plan4.Cells(i, "ag")
Item.SubItems(33) = Plan4.Cells(i, "ah")
Item.SubItems(34) = Plan4.Cells(i, "ai")

O erro é apontado aqui:

Quando eu passo o cursor por cima de cada Item, aparece a mensagem: "Variável do objeto ou variável do bloco With não definida"
Avatar do usuário
Por Mazzarolo
Avatar
#67021
Fiz a carga do combox de clientes numa variavel de formulario: tipo "UFormCliente.CodCli " esta carga carregava todos os clientes de minha tabela de cliente para serem selecionado na hora da inclusão do mesmo. como fiz uma modificação no tamanho do codigo ou seja eram 4 digito e passou a ser 5 digitos ao efetuar a atribuição do cliente com 4 digitos apos ter carregado o combox com 5 digito o erro 380 apareceu. Pra mim foi como dizer impossivel inicializar o codigo do cliente com um codigo INEXISTENTE no combox. alterei os codigo para 5 digitos colocando um zero na frente e tudo ficou certo.
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