Private SubCommandButton1_Click()
UserForm1.TextBox1.Value =""
UserForm1.TextBox2.Value =""
UserForm1.TextBox3.Value =""
UserForm1.TextBox4.Value =""
UserForm1.TextBox5.Value =""
UserForm1.TextBox6.Value =""
End Sub
Private SubCommandButton2_Click()
If TextBox1= "" Or TextBox2= "" Or TextBox3= "" Or TextBox4= "" Or TextBox5= "" Or TextBox6=
"" ThenMsgBox "¡¡Cuidado!!Faltancamposporllenar",vbInformation,"Errorde captura"
Else
Range("A"&Cells.Row.Count).End(x1Up).Offset(1).Select
ActiveCell =TextBox1.Value
ActiveCell.Offset(0,1) = TextBox2.Value
ActiveCell.Offset(0,2) = TextBox3.Value
ActiveCell.Offset(0,3) = TextBox4.Value
ActiveCell.Offset(0,4) = TextBox5.Value
ActiveCell.Offset(0,5) = TextBox6.Value
If OptionButton1.Value ="Verdadero"Then
ActiveCell.Offset(0,6).FormulaR1C1= "20"
End If
If OptionButton2.Value ="Verdadero"Then
ActiveCell.Offset(0,6).FormulaR1C1= "0"
End If
MsgBox "ContactoGuardadocon Exito",vbOKOnly,"Registro"
TextBox1= ""
TextBox2= ""
TextBox3= ""
TextBox4= ""
TextBox5= ""
TextBox6= ""
End If

More Related Content

DOCX
DOC
DOC
yazılı
DOCX
Makalah Pemrograman Visual “Aplikasi Travel”
PDF
Kajal Gaharwal , BCA Third Year
PDF
Pooja Sharma , BCA Third Year
PDF
Rakesh Bijawat , BCA Third Year
DOC
yazılı
Makalah Pemrograman Visual “Aplikasi Travel”
Kajal Gaharwal , BCA Third Year
Pooja Sharma , BCA Third Year
Rakesh Bijawat , BCA Third Year

Similar to Macros (13)

PPTX
VBA PROGRAMMING .pptx
PPTX
VBA PROGRAMMING .pptx
DOC
Correction s+ rie_vb
PDF
Control de acceso con excel
PDF
Kirti Kumawat, BCA Third Year
PDF
Bhanu Pratap Singh Shekhawat, BCA Third Year
PPTX
Reservasi hotel
PDF
Reshma Kodwani , BCA Third Year
PDF
Ravi Prakash Yadav , BCA Third Year
PDF
Inventory management
PDF
Sudarshan Joshi , BCA Third Year
PDF
Akshay Sharma , BCA Third Year
PDF
Harendra Singh,BCA Third Year
VBA PROGRAMMING .pptx
VBA PROGRAMMING .pptx
Correction s+ rie_vb
Control de acceso con excel
Kirti Kumawat, BCA Third Year
Bhanu Pratap Singh Shekhawat, BCA Third Year
Reservasi hotel
Reshma Kodwani , BCA Third Year
Ravi Prakash Yadav , BCA Third Year
Inventory management
Sudarshan Joshi , BCA Third Year
Akshay Sharma , BCA Third Year
Harendra Singh,BCA Third Year
Ad

More from Pilar Gurrola (11)

PPTX
Presentacion
PPTX
Estados del agua
PPTX
Unidad 1
PPTX
Presentacion excel grupo 2 3
PDF
Hot potatoes
PPTX
Cuerpo humano
PPTX
Complejidad y ecosistemas de aprendizaje
PPTX
Diseño de material didáctico
PPTX
Gurrola pilar act2
PPTX
Gurrola pilar act2
Presentacion
Estados del agua
Unidad 1
Presentacion excel grupo 2 3
Hot potatoes
Cuerpo humano
Complejidad y ecosistemas de aprendizaje
Diseño de material didáctico
Gurrola pilar act2
Gurrola pilar act2
Ad

Recently uploaded (20)

PDF
What if we spent less time fighting change, and more time building what’s rig...
PDF
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
PDF
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
PDF
Hazard Identification & Risk Assessment .pdf
PDF
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
PDF
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 2).pdf
PDF
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
PPTX
20th Century Theater, Methods, History.pptx
PDF
HVAC Specification 2024 according to central public works department
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PDF
Paper A Mock Exam 9_ Attempt review.pdf.
PDF
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
PDF
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
PDF
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
DOCX
Cambridge-Practice-Tests-for-IELTS-12.docx
PDF
Trump Administration's workforce development strategy
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
Empowerment Technology for Senior High School Guide
What if we spent less time fighting change, and more time building what’s rig...
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
Hazard Identification & Risk Assessment .pdf
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 2).pdf
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
20th Century Theater, Methods, History.pptx
HVAC Specification 2024 according to central public works department
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
Paper A Mock Exam 9_ Attempt review.pdf.
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Cambridge-Practice-Tests-for-IELTS-12.docx
Trump Administration's workforce development strategy
Chinmaya Tiranga quiz Grand Finale.pdf
Empowerment Technology for Senior High School Guide

Macros

  • 1. Private SubCommandButton1_Click() UserForm1.TextBox1.Value ="" UserForm1.TextBox2.Value ="" UserForm1.TextBox3.Value ="" UserForm1.TextBox4.Value ="" UserForm1.TextBox5.Value ="" UserForm1.TextBox6.Value ="" End Sub Private SubCommandButton2_Click() If TextBox1= "" Or TextBox2= "" Or TextBox3= "" Or TextBox4= "" Or TextBox5= "" Or TextBox6= "" ThenMsgBox "¡¡Cuidado!!Faltancamposporllenar",vbInformation,"Errorde captura" Else Range("A"&Cells.Row.Count).End(x1Up).Offset(1).Select ActiveCell =TextBox1.Value ActiveCell.Offset(0,1) = TextBox2.Value ActiveCell.Offset(0,2) = TextBox3.Value ActiveCell.Offset(0,3) = TextBox4.Value ActiveCell.Offset(0,4) = TextBox5.Value ActiveCell.Offset(0,5) = TextBox6.Value If OptionButton1.Value ="Verdadero"Then ActiveCell.Offset(0,6).FormulaR1C1= "20" End If If OptionButton2.Value ="Verdadero"Then ActiveCell.Offset(0,6).FormulaR1C1= "0" End If MsgBox "ContactoGuardadocon Exito",vbOKOnly,"Registro" TextBox1= "" TextBox2= "" TextBox3= "" TextBox4= "" TextBox5= "" TextBox6= "" End If