Ir ao conteúdo
  • Cadastre-se

Basole

Membro Pleno
  • Posts

    2.019
  • Cadastrado em

  1. @Bianca Chagas No arquivo Excel, na clouna "G" acrescente todos os endereços (caminho), das fotos que serão inseridas na apresentação do arquivo PowerPoint. * Feche o arquivo do Excel Para Executar a macro, no arquivo PowerPoint, aperte as teclas Alt+ F8, em seguida click 2 vezes na macro "MalaDiretaComExcel" e aguarde. MalaDiretaPPT.zip
  2. @isabela queiroz se o que deseja copiar o que está abaixo de PN, ou seja a uma linha abaixo, utilize referenciando o endereço da linha e a respectiva coluna: Cells(rngPN.Row+1, Coluna)
  3. @isabela queiroz testei o codigo que modificou e está funcionando perfeitaemnte. De qualquer forma alterei o codigo para copiar celula por celula. (* este processo pode demorar dependendo dos seus dados). Acrescentei tambem o comando para ocultar a aba de exemplo. *Para o comando ocultar aba, funcione sem erro, precisa acrescentar antes, o comando para ativar uma outra aba que esteja visivel. Salvar_Sheet_Novo_Arquivo.zip
  4. @JorgeSouza coloque o prefixo VBA. em todas funções: Vba.Format VBA.Ucase VBA. DateAdd
  5. @JorgeSouza acrescente VBA antes de date Vba.Date
  6. @isabela queirozVeja se o exemplo atende Salvar_Sheet_Novo_Arquivo.zip
  7. Segue com as alterações Exemplo_Numeracao_Automatica_Salvar-Docx.zip
  8. Segue com as alterações VBA CONFORME O DIA DA SEMANA APRESENTAR O NOME DO PROFESSOR - PERG.zip
  9. @Luis Filipe Garrido pra mim não ficou muito claro a sua questão!
  10. @GENECIOFICIAL veja se é isso VBA CONFORME O DIA DA SEMANA APRESENTAR O NOME DO PROFESSOR - PERG.zip
  11. Com vba é possível, mas é necessario analisar melhor a formatação do seu arquivo Segue um exemplo generico: Sub LerImportarTXT() Dim fso As Object Dim sourceFile As Object Dim myFilePath As String Dim myFileText As String Dim LR! Dim line As String Set fso = CreateObject("Scripting.FileSystemObject") myFilePath = "C:\Temp\txt\Teste.txt" 'ALTERE O LOCAL E NOME DO ARQUIVO LR = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Offset(1).Row Set sourceFile = fso.OpenTextFile(myFilePath, 1) If Not sourceFile.AtEndOfStream Then line = sourceFile.ReadLine With ActiveSheet .Cells(LR, 1) = VBA.Trim(VBA.Mid(line, 3, 13)) ' NOME: caractere 03 ate 15 (tamanho 13) .Cells(LR, 2) = VBA.Trim(VBA.Mid(line, 16, 15)) 'CIDADE: caractere 16 ate 30 (tamanho 15) .Cells(LR, 3) = VBA.Trim(VBA.Mid(line, 31, 5)) ' NUMERO DO PEDIDO: caractere 31 ate 35 (tamanho 5) .Cells(LR, 4) = VBA.Trim(VBA.Mid(line, 36, 1)) 'ORDEM: caractere 36 (tamanho 1) End With End If sourceFile.Close End Sub
  12. Tente Range("H11").value = Range("H11").value * 1.01 Para 1% e * 1.005 para 0,5 %
  13. @Andreza Santos Fiz alterações na sub Inserir_Clientes Sub Inserir_clientes() Dim tabela_clientes As ListObject Dim n As Integer Dim id As Integer Dim ws As Worksheet Set ws = Sheets("Clientes") Set tabela_clientes = ws.ListObjects("Clientes") id = Range("ID").Value With tabela_clientes .ListRows.Add n = .DataBodyRange.Columns(1).Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row .DataBodyRange(RowIndex:=n, columnindex:=1).Value = id .DataBodyRange(RowIndex:=n, columnindex:=2).Value = Sistema.txt_nome.Value .DataBodyRange(RowIndex:=n, columnindex:=3).Value = Sistema.cbb_sexo.Value .DataBodyRange(RowIndex:=n, columnindex:=4).Value = Sistema.txt_telefone.Value .DataBodyRange(RowIndex:=n, columnindex:=5).Value = Sistema.txt_cep.Value .DataBodyRange(RowIndex:=n, columnindex:=6).Value = Sistema.txt_endereco.Value .DataBodyRange(RowIndex:=n, columnindex:=7).Value = Sistema.txt_numero.Value .DataBodyRange(RowIndex:=n, columnindex:=8).Value = Sistema.txt_bairro.Value .DataBodyRange(RowIndex:=n, columnindex:=9).Value = Sistema.txt_local.Value Range("ID").Value = id + 1 With Sistema .txt_nome.Text = "" .cbb_sexo.Text = "" .txt_telefone.Text = "" .txt_cep.Text = "" .txt_endereco.Text = "" .txt_numero.Text = "" .txt_bairro.Text = "" .txt_local.Text = "" End With Call Atualizar_listclientes MsgBox "Cadastrado com sucesso!", vbInformation, "Informação" End With End Sub *Caso o erro persista, tente deletar toda a tabela "Clientes" e inserir novamente.
  14. @Andreza Santos sim eu fiz os testes tambem de cadastrar novos cilentes; Adicionou novos registros na tabela clientes, sem problemas Qual a versão do seu Excel (office) ?
  15. @Andreza Santos aqui pra mim só apareceu erro na hora de atualizar, na Sub Atualizar_listclientes Fiz umas pequenas alterações, ai funcionou sem problemas: Ficou assim: Sub Atualizar_listclientes() Dim tabela As ListObject Set tabela = Worksheets("Clientes").ListObjects("Clientes") With Sistema.cbb_clientes .RowSource = "" .Clear .ColumnCount = 2 .List = tabela.DataBodyRange.Value2 End With End Sub

Sobre o Clube do Hardware

No ar desde 1996, o Clube do Hardware é uma das maiores, mais antigas e mais respeitadas comunidades sobre tecnologia do Brasil. Leia mais

Direitos autorais

Não permitimos a cópia ou reprodução do conteúdo do nosso site, fórum, newsletters e redes sociais, mesmo citando-se a fonte. Leia mais

×
×
  • Criar novo...