SlideShare ist ein Scribd-Unternehmen logo
1 von 11
    Range("I4:N4").Select Selection.Copy     Application.GotoReference:="Fim" Selection.End(xlUp).Select Range(“A9”).Select ActiveSheet.Paste     Application.CutCopyMode = False     Application.GotoReference:="R1C1"     Range("I4:N4").Select Selection.Copy     Application.GotoReference:="Fim" Selection.End(xlUp).Select ActiveCell.Offset(1, 0).Range("A1").Select ActiveSheet.Paste     Application.CutCopyMode = False     Application.GotoReference:="R1C1"
Sub Recepcao() 'Macro Recepção de Dados DimVarCurso As String DimVarData As Date DimVarParticipante As String DimVarDepto As String DimVarEmpresa As String DimVarCusto As Single VarCurso = Application.InputBox("Entre o Curso:", , , , , , 2) 'O Valor 2 no InputBox para dados Alfanumericos VarData = Application.InputBox("Entre a Data:", , , , , , 1) 'O Valor 1 no InputBox para dados numericos VarParticipante = Application.InputBox("Entre o Participante:", , , , , , 2) VarDepto = Application.InputBox("Entre o Departamento:", , , , , , 2) VarEmpresa = Application.InputBox("Entre a Empresa:", , , , , , 2) VarCusto = Application.InputBox("Entre o Custo:", , , , , , 1)
Range("EntraCurso").Select ActiveCell.FormulaR1C1 = VarCurso     Range("EntraData").Select ActiveCell.FormulaR1C1 = VarData     Range("EntraParticipante").Select ActiveCell.FormulaR1C1 = VarParticipante     Range("EntraDepto").Select ActiveCell.FormulaR1C1 = VarDepto     Range("EntraEmpresa").Select ActiveCell.FormulaR1C1 = VarEmpresa     Range("EntraCusto").Select ActiveCell.FormulaR1C1 = VarCusto End Sub
Sub SalvaCadastro() ' ' SalvaCadastro Macro ' Salva Cadastro ' ' Atalho do teclado: Ctrl+s ' VarSalva = MsgBox("Deseja Salvar?", 1 + 32, "Salvar Dados") IfVarSalva = vbOKThen         Application.StatusBar = "Salvando Arquivo - Aguarde!!!" ActiveWorkbook.Save MsgBox "Arquivo salvo com sucesso", 64, "Salvo" EndIf     Application.StatusBar = False End Sub
Private Sub BotOK_Click() If OptionButton1.Value = TrueThen SortCurso ElseIf OptionButton2.Value = TrueThen SortData ElseIf OptionButton3.Value = TrueThen SortParticipante Else SortRelatorio EndIf End Sub Private Sub BotCancelar_Click()     End End Sub
Private Sub BtOK_Click() VarCurso = CxCadastro.CampoCurso VarData = CxCadastro.CampoData VarParticipante = CxCadastro.CampoParticipante VarDepto = CxCadastro.CampoDepto VarEmpresa = CxCadastro.CampoEmpresa VarCusto = CxCadastro.CampoCusto     Range("EntraCurso").Select ActiveCell.FormulaR1C1 = VarCurso    Range("EntraData").Select ActiveCell.FormulaR1C1 = VarData     Range("EntraParticipante").Select ActiveCell.FormulaR1C1 = VarParticipante     Range("EntraDepto").Select ActiveCell.FormulaR1C1 = VarDepto     Range("EntraEmpresa").Select ActiveCell.FormulaR1C1 = VarEmpresa     Range("EntraCusto").Select ActiveCell.FormulaR1C1 = VarCusto
    Transporte CxCadastro.CampoCurso = "" CxCadastro.CampoData = "" CxCadastro.CampoParticipante = "" CxCadastro.CampoDepto = "" CxCadastro.CampoEmpresa = "" CxCadastro.CampoCusto = "" End Sub Private Sub BtCancelar_Click() End End Sub

Weitere ähnliche Inhalte

Andere mochten auch

Diseminare proiect TIA "Sa dam dovada ca se poate"
Diseminare proiect TIA "Sa dam dovada ca se poate"Diseminare proiect TIA "Sa dam dovada ca se poate"
Diseminare proiect TIA "Sa dam dovada ca se poate"Tabacaru Nelia
 
Diseminare vizita de studiu in Bulgaria
Diseminare vizita de studiu in BulgariaDiseminare vizita de studiu in Bulgaria
Diseminare vizita de studiu in BulgariaTabacaru Nelia
 
Mathematics of life
Mathematics of lifeMathematics of life
Mathematics of lifeAnita Navia
 
Diseminare curs Comenius "Interactive Multimedia Presentation"
Diseminare curs Comenius "Interactive Multimedia Presentation"Diseminare curs Comenius "Interactive Multimedia Presentation"
Diseminare curs Comenius "Interactive Multimedia Presentation"Tabacaru Nelia
 
“Empowerment in ict skills making use of media & communication technology to...
 “Empowerment in ict skills making use of media & communication technology to... “Empowerment in ict skills making use of media & communication technology to...
“Empowerment in ict skills making use of media & communication technology to...Tabacaru Nelia
 
RIMS2010 Presentation
RIMS2010 PresentationRIMS2010 Presentation
RIMS2010 Presentationfortmang
 

Andere mochten auch (13)

Recognition
RecognitionRecognition
Recognition
 
Diseminare proiect TIA "Sa dam dovada ca se poate"
Diseminare proiect TIA "Sa dam dovada ca se poate"Diseminare proiect TIA "Sa dam dovada ca se poate"
Diseminare proiect TIA "Sa dam dovada ca se poate"
 
Equipos en riesgo
Equipos  en riesgoEquipos  en riesgo
Equipos en riesgo
 
SRS4(2)
SRS4(2)SRS4(2)
SRS4(2)
 
IFLO AIR LOGISTICS SOLUTION
IFLO AIR LOGISTICS SOLUTIONIFLO AIR LOGISTICS SOLUTION
IFLO AIR LOGISTICS SOLUTION
 
Diseminare vizita de studiu in Bulgaria
Diseminare vizita de studiu in BulgariaDiseminare vizita de studiu in Bulgaria
Diseminare vizita de studiu in Bulgaria
 
Mathematics of life
Mathematics of lifeMathematics of life
Mathematics of life
 
SRS4(3)
SRS4(3)SRS4(3)
SRS4(3)
 
Diseminare curs Comenius "Interactive Multimedia Presentation"
Diseminare curs Comenius "Interactive Multimedia Presentation"Diseminare curs Comenius "Interactive Multimedia Presentation"
Diseminare curs Comenius "Interactive Multimedia Presentation"
 
“Empowerment in ict skills making use of media & communication technology to...
 “Empowerment in ict skills making use of media & communication technology to... “Empowerment in ict skills making use of media & communication technology to...
“Empowerment in ict skills making use of media & communication technology to...
 
RIMS2010 Presentation
RIMS2010 PresentationRIMS2010 Presentation
RIMS2010 Presentation
 
SRS4(1)
SRS4(1)SRS4(1)
SRS4(1)
 
Apostila des.arq. v1-2012
Apostila des.arq. v1-2012Apostila des.arq. v1-2012
Apostila des.arq. v1-2012
 

Ähnlich wie Excel vba 2007

Introduction to Basic C programming 01
Introduction to Basic C programming 01Introduction to Basic C programming 01
Introduction to Basic C programming 01Wingston
 
Qtp Training Deepti 3 Of 44256
Qtp Training Deepti 3 Of 44256Qtp Training Deepti 3 Of 44256
Qtp Training Deepti 3 Of 44256Azhar Satti
 
Moving Average Filter in C
Moving Average Filter in CMoving Average Filter in C
Moving Average Filter in CColin
 
QTP Presentation2
QTP Presentation2QTP Presentation2
QTP Presentation2vucevic
 
Procedure to create_the_calculator_application java
Procedure to create_the_calculator_application javaProcedure to create_the_calculator_application java
Procedure to create_the_calculator_application javagthe
 
Csw2016 gawlik bypassing_differentdefenseschemes
Csw2016 gawlik bypassing_differentdefenseschemesCsw2016 gawlik bypassing_differentdefenseschemes
Csw2016 gawlik bypassing_differentdefenseschemesCanSecWest
 
C programming tweak needed for a specific program.This is the comp.pdf
C programming tweak needed for a specific program.This is the comp.pdfC programming tweak needed for a specific program.This is the comp.pdf
C programming tweak needed for a specific program.This is the comp.pdfflashfashioncasualwe
 
ChakraCore: analysis of JavaScript-engine for Microsoft Edge
ChakraCore: analysis of JavaScript-engine for Microsoft EdgeChakraCore: analysis of JavaScript-engine for Microsoft Edge
ChakraCore: analysis of JavaScript-engine for Microsoft EdgePVS-Studio
 
Control structure of c
Control structure of cControl structure of c
Control structure of cKomal Kotak
 
Dam31303 dti2143 lab sheet 7
Dam31303 dti2143 lab sheet 7Dam31303 dti2143 lab sheet 7
Dam31303 dti2143 lab sheet 7alish sha
 
C decision making and looping.
C decision making and looping.C decision making and looping.
C decision making and looping.Haard Shah
 
Analysis of Microsoft Code Contracts
Analysis of Microsoft Code ContractsAnalysis of Microsoft Code Contracts
Analysis of Microsoft Code ContractsPVS-Studio
 
C programming language tutorial
C programming language tutorial C programming language tutorial
C programming language tutorial javaTpoint s
 
Lo Mejor Del Pdc2008 El Futrode C#
Lo Mejor Del Pdc2008 El Futrode C#Lo Mejor Del Pdc2008 El Futrode C#
Lo Mejor Del Pdc2008 El Futrode C#Juan Pablo
 
PROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docx
PROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docxPROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docx
PROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docxamrit47
 
Data Structure in C (Lab Programs)
Data Structure in C (Lab Programs)Data Structure in C (Lab Programs)
Data Structure in C (Lab Programs)Saket Pathak
 

Ähnlich wie Excel vba 2007 (20)

UNIT-II CP DOC.docx
UNIT-II CP DOC.docxUNIT-II CP DOC.docx
UNIT-II CP DOC.docx
 
Introduction to Basic C programming 01
Introduction to Basic C programming 01Introduction to Basic C programming 01
Introduction to Basic C programming 01
 
Qtp Training Deepti 3 Of 44256
Qtp Training Deepti 3 Of 44256Qtp Training Deepti 3 Of 44256
Qtp Training Deepti 3 Of 44256
 
Qtp Training
Qtp Training Qtp Training
Qtp Training
 
Moving Average Filter in C
Moving Average Filter in CMoving Average Filter in C
Moving Average Filter in C
 
QTP Presentation2
QTP Presentation2QTP Presentation2
QTP Presentation2
 
Procedure to create_the_calculator_application java
Procedure to create_the_calculator_application javaProcedure to create_the_calculator_application java
Procedure to create_the_calculator_application java
 
Csw2016 gawlik bypassing_differentdefenseschemes
Csw2016 gawlik bypassing_differentdefenseschemesCsw2016 gawlik bypassing_differentdefenseschemes
Csw2016 gawlik bypassing_differentdefenseschemes
 
C programming tweak needed for a specific program.This is the comp.pdf
C programming tweak needed for a specific program.This is the comp.pdfC programming tweak needed for a specific program.This is the comp.pdf
C programming tweak needed for a specific program.This is the comp.pdf
 
ChakraCore: analysis of JavaScript-engine for Microsoft Edge
ChakraCore: analysis of JavaScript-engine for Microsoft EdgeChakraCore: analysis of JavaScript-engine for Microsoft Edge
ChakraCore: analysis of JavaScript-engine for Microsoft Edge
 
Control structure of c
Control structure of cControl structure of c
Control structure of c
 
Dam31303 dti2143 lab sheet 7
Dam31303 dti2143 lab sheet 7Dam31303 dti2143 lab sheet 7
Dam31303 dti2143 lab sheet 7
 
C decision making and looping.
C decision making and looping.C decision making and looping.
C decision making and looping.
 
Analysis of Microsoft Code Contracts
Analysis of Microsoft Code ContractsAnalysis of Microsoft Code Contracts
Analysis of Microsoft Code Contracts
 
Day 1
Day 1Day 1
Day 1
 
C programming language tutorial
C programming language tutorial C programming language tutorial
C programming language tutorial
 
Lo Mejor Del Pdc2008 El Futrode C#
Lo Mejor Del Pdc2008 El Futrode C#Lo Mejor Del Pdc2008 El Futrode C#
Lo Mejor Del Pdc2008 El Futrode C#
 
PROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docx
PROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docxPROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docx
PROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docx
 
CP Handout#2
CP Handout#2CP Handout#2
CP Handout#2
 
Data Structure in C (Lab Programs)
Data Structure in C (Lab Programs)Data Structure in C (Lab Programs)
Data Structure in C (Lab Programs)
 

Kürzlich hochgeladen

Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxPoojaSen20
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 

Kürzlich hochgeladen (20)

LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 

Excel vba 2007

  • 1.
  • 2. Range("I4:N4").Select Selection.Copy Application.GotoReference:="Fim" Selection.End(xlUp).Select Range(“A9”).Select ActiveSheet.Paste Application.CutCopyMode = False Application.GotoReference:="R1C1" Range("I4:N4").Select Selection.Copy Application.GotoReference:="Fim" Selection.End(xlUp).Select ActiveCell.Offset(1, 0).Range("A1").Select ActiveSheet.Paste Application.CutCopyMode = False Application.GotoReference:="R1C1"
  • 3. Sub Recepcao() 'Macro Recepção de Dados DimVarCurso As String DimVarData As Date DimVarParticipante As String DimVarDepto As String DimVarEmpresa As String DimVarCusto As Single VarCurso = Application.InputBox("Entre o Curso:", , , , , , 2) 'O Valor 2 no InputBox para dados Alfanumericos VarData = Application.InputBox("Entre a Data:", , , , , , 1) 'O Valor 1 no InputBox para dados numericos VarParticipante = Application.InputBox("Entre o Participante:", , , , , , 2) VarDepto = Application.InputBox("Entre o Departamento:", , , , , , 2) VarEmpresa = Application.InputBox("Entre a Empresa:", , , , , , 2) VarCusto = Application.InputBox("Entre o Custo:", , , , , , 1)
  • 4. Range("EntraCurso").Select ActiveCell.FormulaR1C1 = VarCurso Range("EntraData").Select ActiveCell.FormulaR1C1 = VarData Range("EntraParticipante").Select ActiveCell.FormulaR1C1 = VarParticipante Range("EntraDepto").Select ActiveCell.FormulaR1C1 = VarDepto Range("EntraEmpresa").Select ActiveCell.FormulaR1C1 = VarEmpresa Range("EntraCusto").Select ActiveCell.FormulaR1C1 = VarCusto End Sub
  • 5. Sub SalvaCadastro() ' ' SalvaCadastro Macro ' Salva Cadastro ' ' Atalho do teclado: Ctrl+s ' VarSalva = MsgBox("Deseja Salvar?", 1 + 32, "Salvar Dados") IfVarSalva = vbOKThen Application.StatusBar = "Salvando Arquivo - Aguarde!!!" ActiveWorkbook.Save MsgBox "Arquivo salvo com sucesso", 64, "Salvo" EndIf Application.StatusBar = False End Sub
  • 6.
  • 7. Private Sub BotOK_Click() If OptionButton1.Value = TrueThen SortCurso ElseIf OptionButton2.Value = TrueThen SortData ElseIf OptionButton3.Value = TrueThen SortParticipante Else SortRelatorio EndIf End Sub Private Sub BotCancelar_Click() End End Sub
  • 8.
  • 9.
  • 10. Private Sub BtOK_Click() VarCurso = CxCadastro.CampoCurso VarData = CxCadastro.CampoData VarParticipante = CxCadastro.CampoParticipante VarDepto = CxCadastro.CampoDepto VarEmpresa = CxCadastro.CampoEmpresa VarCusto = CxCadastro.CampoCusto Range("EntraCurso").Select ActiveCell.FormulaR1C1 = VarCurso Range("EntraData").Select ActiveCell.FormulaR1C1 = VarData Range("EntraParticipante").Select ActiveCell.FormulaR1C1 = VarParticipante Range("EntraDepto").Select ActiveCell.FormulaR1C1 = VarDepto Range("EntraEmpresa").Select ActiveCell.FormulaR1C1 = VarEmpresa Range("EntraCusto").Select ActiveCell.FormulaR1C1 = VarCusto
  • 11. Transporte CxCadastro.CampoCurso = "" CxCadastro.CampoData = "" CxCadastro.CampoParticipante = "" CxCadastro.CampoDepto = "" CxCadastro.CampoEmpresa = "" CxCadastro.CampoCusto = "" End Sub Private Sub BtCancelar_Click() End End Sub