SlideShare a Scribd company logo
1 of 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

More Related Content

Viewers also liked

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
 

Viewers also liked (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
 

Similar to 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
 

Similar to 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)
 

Recently uploaded

Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonJericReyAuditor
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Recently uploaded (20)

Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lesson
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 

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