SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

En vedette

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
 

En vedette (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
 

Similaire à 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
 

Similaire à 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)
 

Dernier

Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
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
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
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
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 

Dernier (20)

Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
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
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
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
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 

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