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 Queilasp
#15625
Ola galera...

tenho um arquivo que tem que ser alimentado todos os dias por horas trabalhadas... a planilha é alimentada por um formulário e esta acontecendo o seguinte:

Na minha maquina a planilha roda belezinha e quando coloco na rede as formulas não funcionam alguém tem uma solução?????
Avatar do usuário
Por alexandrevba
Avatar
#15627
Boa tarde!!

Sua dúvida é muito vaga, pode haver uma série de fatores para que isso não ocorra!

Poste suas rotinas ou arquivo modelo, tente detalhar o que está fazendo, pois assim o pessoal possa leh ajudar.

Att
Por Queilasp
#15682
A rotina de gravar dados abaixo

Private Sub CmdCadastrar_Click()

'Validação de preenchimento obrigatório de texto, OptionButton e CheckBox
'TextBox
If TxtCodigo = "" Then
MsgBox "Preenchimento Obrigatório", vbExclamation, "Preencha do Codigo da Empresa"
TxtCodigo.SetFocus
Exit Sub
End If

If Not IsDate(TextBox1) Then
MsgBox "Preenchimento Obrigatório", vbExclamation, "Preencha a Data Corretamente"
TextBox1.SetFocus
Exit Sub
End If

If TextBox2 = "00:00" And TextBox3 = "00:00" Then
MsgBox "Preenchimento Obrigatório", vbExclamation, "Preencha a Hora de Início e Fim da Atividade"
TextBox3.SetFocus
Exit Sub
End If

'OptionButton atividade

If OptionButton1.Value = False And OptionButton2.Value = False And OptionButton3.Value = False And OptionButton4.Value = False And OptionButton5.Value = False And OptionButton6.Value = False And OptionButton7.Value = False And OptionButton8.Value = False And OptionButton9.Value = False And OptionButton10.Value = False And OptionButton11.Value = False And OptionButton12.Value = False Then
MsgBox "Campo Atividade!", vbExclamation, "Preenchimento Obrigatório!"
Exit Sub
End If

'OptionButton Ano Trabalhado
If OptionButton18.Value = True And ComboBox1 = "" Then
MsgBox "Selecione o Motivo do Reprocessamento!", vbExclamation, "Preenchimento Obrigatório!"
Exit Sub
End If


' Posiciona o Curso na Primeira Celula Vazia da Coluna "A"

Sheets("Cadastro").Select
Range("A65536").End(xlUp).Offset(1, 0).Select
If Not IsNumeric(ActiveCell.Offset(-1, 0)) Then
ActiveCell = 1

Else
ActiveCell = ActiveCell.Offset(-1, 0) + 1
End If

'Gravar dados do formulário - (grava dados de caixa de Texto
'active.Cell.Offset(0, 1) <-- grava na linha vazia coluna 1

ActiveCell.Offset(0, 1).Value = DateValue(TextBox1.Text) 'data
ActiveCell.Offset(0, 2) = CmbColaborador
ActiveCell.Offset(0, 3) = VblCoordenador
ActiveCell.Offset(0, 4) = TxtCodigo
ActiveCell.Offset(0, 5) = Empresa
ActiveCell.Offset(0, 8) = ComboBox1
ActiveCell.Offset(0, 11) = TextBox2 'hora Inicial
ActiveCell.Offset(0, 12) = TextBox3 'hora Final


'informações checkbox meses trabalhados

ActiveCell.Offset(0, 19) = CheckBox1 'Jan
ActiveCell.Offset(0, 20) = CheckBox2 'Fev
ActiveCell.Offset(0, 21) = CheckBox3 'Mar
ActiveCell.Offset(0, 22) = CheckBox4 'Abr
ActiveCell.Offset(0, 23) = CheckBox5 'Mai
ActiveCell.Offset(0, 24) = CheckBox6 'Jun
ActiveCell.Offset(0, 25) = CheckBox7 'Jul
ActiveCell.Offset(0, 26) = CheckBox8 'Ago
ActiveCell.Offset(0, 27) = CheckBox9 'Set
ActiveCell.Offset(0, 28) = CheckBox10 'Out
ActiveCell.Offset(0, 29) = CheckBox11 'Nov
ActiveCell.Offset(0, 30) = CheckBox12 'Dez


'Função If para gravar dados de Botao de Opção Frame Atividade
'Caso a Marcação seja Verdadeira ele grava o que está escrito no value....

If OptionButton1.Value = True Then
ActiveCell.Offset(0, 6).Value = "Recebimentos"
ElseIf OptionButton2.Value = True Then
ActiveCell.Offset(0, 6).Value = "Importação XML"
ElseIf OptionButton3.Value = True Then
ActiveCell.Offset(0, 6).Value = "Conv. N.F. Tom./Prest."
ElseIf OptionButton4.Value = True Then
ActiveCell.Offset(0, 6).Value = "Classif. N.F."
ElseIf OptionButton5.Value = True Then
ActiveCell.Offset(0, 6).Value = "Soma/Conferência"
ElseIf OptionButton6.Value = True Then
ActiveCell.Offset(0, 6).Value = "Correção Arquivos"
ElseIf OptionButton7.Value = True Then
ActiveCell.Offset(0, 6).Value = "Emissão de Guias"
ElseIf OptionButton8.Value = True Then
ActiveCell.Offset(0, 6).Value = "Emiss. Guias Imp. Retidos"
ElseIf OptionButton9.Value = True Then
ActiveCell.Offset(0, 6).Value = "Envio de Guias"
ElseIf OptionButton10.Value = True Then
ActiveCell.Offset(0, 6).Value = "Recalc Guias"
ElseIf OptionButton11.Value = True Then
ActiveCell.Offset(0, 6).Value = "Ativ. Adm./Consultoria"
ElseIf OptionButton12.Value = True Then
ActiveCell.Offset(0, 6).Value = "Livros"
Else
ActiveCell.Offset(0, 6) = ""
End If

'Função If para gravar dados de Botao de Opção do Frame Ano Trabalhado

If OptionButton18.Value = True Then
ActiveCell.Offset(0, 7).Value = "Sim"
Else
ActiveCell.Offset(0, 7) = ""
End If

'Função If para gravar dados de Botao de Opção do Obrigações Acessórias

If OptionButton16.Value = True Then
ActiveCell.Offset(0, 9) = "GIA"
ElseIf OptionButton13.Value = True Then
ActiveCell.Offset(0, 9) = "SPEED Fiscal"
ElseIf OptionButton17.Value = True Then
ActiveCell.Offset(0, 9) = "EFD Contribuições"
ElseIf OptionButton15.Value = True Then
ActiveCell.Offset(0, 9) = "SEDIF"
ElseIf OptionButton14.Value = True Then
ActiveCell.Offset(0, 9) = "REDF"
Else
ActiveCell.Offseift(0, 9) = ""
End If

TextBox4 = Format(TimeValue(TextBox3) - TimeValue(TextBox2), "hh:nn:ss")

End Sub

esta rotina esta funcionando belezinha e na planilha para completar o relatório tem função somase para somar as horas cadastradas por atividade e data e uma função se para extrair a hora de almoço!!!!

a rotina roda normalmente as as funçoes na planilha não!!!!
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