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

Presentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptxPresentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptxRosabel UA
 
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
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
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
 
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
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmStan Meyer
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 

Dernier (20)

Presentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptxPresentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptx
 
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
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.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
 
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
 
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
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and Film
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptxINCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 

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