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.
Por blufmlhh
#13721
Bom dia Galera
Tenho um formulario em VBA cujo finalidade é fazer avaliação.
quero que :
se check estiver flegado, ao salvar check o frame daquele chek seja salvo na linha corespondente do chek salvo

Ssegue Word para ilustrar .

O codigo que estou usando é o seguinte


'Vai registar os desvios
Private Sub Command_Registra_Click()

Dim Itens As Boolean
Itens = False

For i = 1 To 17 'Valida os itens do dialogo com label
If Controls("Check" & i) = True Then
Itens = True
Exit For
End If
Next

If Text_Data = "" Then ' valida data
MsgBox "Favor informar a data!", vbCritical, "Mensagem do Sistema"

ElseIf TextBox_Cod_Transp = "" Then ' valida codigo do transportador
MsgBox "Favor informar o código"

ElseIf Not Itens Then
MsgBox "Favor informar ao menos um iten !", vbCritical, "Mensagem do Sistema"
Else

For i = 1 To 17 'Registra descrição do iten
If Controls("Check" & i) = True Then
Linha = Sheet12.Range("A1").CurrentRegion.Rows.Count
Sheet12.Cells(Linha + 1, 1) = Text_Data 'registra data
Sheet12.Cells(Linha + 1, 2) = TextBox_Cod_Transp ' registra codigo transportador
Sheet12.Cells(Linha + 1, 3) = Text_Nome_Transp ' registra nome do transportador
Sheet12.Cells(Linha + 1, 4) = TextBox_Nome_GT ' registra nome do GT

Sheet12.Cells(Linha + 1, 5) = Controls("Frame").Caption ' registra frame

Sheet12.Cells(Linha + 1, 6) = Controls("Check" & i).Caption ' registra o desvio

End If
Next

MsgBox "Registro efetuado com sucesso!"
LimparItens

End If
Você não está autorizado a ver ou baixar esse anexo.
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