SlideShare a Scribd company logo
1 of 11
CODIGO PARA EL FORMULARIO frm_Entradas
Private SubComboBox1_Change()
DimFilaAs Integer
DimFinal As Integer
If ComboBox1.Value="" Then
Me.txt_Nombre =""
Me.txt_Saldo= ""
End If
For Fila= 2 To 1000
If Hoja2.Cells(Fila,1) = "" AndHoja5.Cells(Fila,1) = "" Then
Final = Fila- 1
ExitFor
EndIf
Next
For Fila= 2 To Final
If ComboBox1= Hoja2.Cells(Fila,1) Then
Me.txt_Nombre =Hoja2.Cells(Fila,2)
ExitFor
EndIf
Next
For Fila= 2 To Final
If ComboBox1= Hoja5.Cells(Fila,1) Then
Me.txt_Saldo=Hoja5.Cells(Fila,3)
ExitFor
EndIf
Next
End Sub
Private SubComboBox1_Enter()
DimFilaAs Integer
DimFinal As Integer
DimLista As String
For Fila= 1 To ComboBox1.ListCount
ComboBox1.RemoveItem0
NextFila
For Fila= 2 To 1000
If Hoja2.Cells(Fila,1) = "" Then
Final = Fila- 1
ExitFor
EndIf
Next
For Fila= 2 To Final
Lista= Hoja2.Cells(Fila,1)
ComboBox1.AddItem(Lista)
Next
End Sub
Private SubCommandButton1_Click()
DimFilaAs Integer
DimFinal As Integer
DimExistenciaAsInteger
DimTotal AsInteger
For Fila= 2 To 1000
If Hoja3.Cells(Fila,1) = "" Then
Final = Fila
ExitFor
EndIf
Next
Hoja3.Cells(Final,1) = Me.ComboBox1
Hoja3.Cells(Final,2) = Me.txt_Nombre
Hoja3.Cells(Final,3) = Me.txt_FechaIng
Hoja3.Cells(Final,4) = Me.txt_Factura
Hoja3.Cells(Final,5) = Me.txt_Proveedor
Hoja3.Cells(Final,6) = Me.txt_Cantidad
For Fila= 2 To 1000
If Hoja5.Cells(Fila,1) = Hoja3.Cells(Final,1) Then
Existencia=Hoja5.Cells(Fila,3)
Total = Me.txt_Cantidad+Existencia
Hoja5.Cells(Fila,3) = Total
ExitFor
EndIf
Next
Me.ComboBox1=""
Me.txt_Nombre =""
Me.txt_FechaIng=""
Me.txt_Factura= ""
Me.txt_Proveedor=""
Me.txt_Cantidad=""
End Sub
Private SubCommandButton2_Click()
UnloadMe
End Sub
CODIGO frm_Menu
Private SubCommandButton1_Click()
frm_RegistrarProducto.Show
End Sub
Private SubCommandButton2_Click()
frm_ModificarProducto.Show
End Sub
Private SubCommandButton3_Click()
frm_Entradas.Show
End Sub
CODIGO frm_ModificarProducto
Private SubComboBox1_Change()
DimFilaAs Integer
DimFinal As Integer
If ComboBox1.Value="" Then
Me.txt_Nombre =""
Me.txt_Descrip= ""
End If
For Fila= 2 To 1000
If Hoja2.Cells(Fila,1) = "" Then
Final = Fila- 1
ExitFor
EndIf
Next
For Fila= 2 To Final
If ComboBox1= Hoja2.Cells(Fila,1) Then
Me.txt_Nombre =Hoja2.Cells(Fila,2)
Me.txt_Descrip=Hoja2.Cells(Fila,3)
ExitFor
EndIf
Next
End Sub
Private SubComboBox1_Enter()
DimFilaAs Integer
DimFinal As Integer
DimLista As String
For Fila= 1 To ComboBox1.ListCount
ComboBox1.RemoveItem0
NextFila
For Fila= 2 To 1000
If Hoja2.Cells(Fila,1) = "" Then
Final = Fila- 1
ExitFor
EndIf
Next
For Fila= 2 To Final
Lista= Hoja2.Cells(Fila,1)
ComboBox1.AddItem(Lista)
Next
End Sub
Private SubCommandButton1_Click()
Dim FilaAsInteger
Dim Final AsInteger
For Fila= 2 To 1000
If Hoja2.Cells(Fila,1) = "" AndHoja3.Cells(Fila,1) = "" AndHoja5.Cells(Fila,1) ="" Then
Final = Fila- 1
ExitFor
EndIf
Next
For Fila= 2 To Final
If Me.ComboBox1= Hoja2.Cells(Fila, 1) Then
Hoja2.Cells(Fila,2) = Me.txt_Nombre
Hoja2.Cells(Fila,3) = Me.txt_Descrip
ExitFor
EndIf
Next
'-------------------------------------------------
For Fila= 2 To Final
If Me.ComboBox1= Hoja3.Cells(Fila,1) Then
Hoja3.Cells(Fila,2) = Me.txt_Nombre
EndIf
Next
For Fila= 2 To Final
If Me.ComboBox1= Hoja5.Cells(Fila,1) Then
Hoja5.Cells(Fila,2) = Me.txt_Nombre
ExitFor
EndIf
Next
'-------------------------------------------------
Me.ComboBox1= ""
Me.txt_Nombre =""
Me.txt_Descrip= ""
End Sub
Private SubCommandButton2_Click()
UnloadMe
End Sub
CODIGO frm_RegistrarProducto
Private SubCommandButton1_Click()
Dim FilaAsInteger
Dim Final AsInteger
Dim RegistroAsInteger
ForFila= 1 To 1000
If Hoja2.Cells(Fila,1) = "" Then
Final = Fila
ExitFor
End If
Next
ForRegistro= 2 To Final
If Hoja2.Cells(Registro,1) = Me.txt_CodProdThen
Me.txt_CodProd.BackColor=&H8080FF
MsgBox ("Registroyaexiste"+Chr(13) + "Ingrese uncódigodiferente")
Me.txt_CodProd.SetFocus
ExitSub
ExitFor
End If
Next
If MsgBox("Soncorrectoslosdatos?"+ Chr(13) + "Deseaproceder?",vbOKCancel) =vbOKThen
Me.txt_CodProd.BackColor=&HFFFFFF
Hoja2.Cells(Final,1) = Me.txt_CodProd
Hoja2.Cells(Final,2) = Me.txt_Nombre
Hoja2.Cells(Final,3) = Me.txt_Descrip
'-----------------------------------------------
Hoja5.Cells(Final,1) = Me.txt_CodProd
Hoja5.Cells(Final,2) = Me.txt_Nombre
Hoja5.Cells(Final,3) = 0
'-----------------------------------------------
Me.txt_CodProd=""
Me.txt_Nombre =""
Me.txt_Descrip= ""
Me.txt_CodProd.SetFocus
Else
ExitSub
End If
End Sub
Private Sub CommandButton2_Click()
UnloadMe
End Sub
MODULO 1
SubMenu_Principal()
frm_Menu.Show
End Sub

More Related Content

Recently uploaded

Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
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
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
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
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
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
 
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
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 
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
 
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
 
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
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
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
 

Recently uploaded (20)

Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
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
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
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
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
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
 
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"
 
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
 
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
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 
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
 
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
 
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
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
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
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Codigo para el formulario frm

  • 1. CODIGO PARA EL FORMULARIO frm_Entradas Private SubComboBox1_Change() DimFilaAs Integer DimFinal As Integer If ComboBox1.Value="" Then Me.txt_Nombre ="" Me.txt_Saldo= "" End If For Fila= 2 To 1000 If Hoja2.Cells(Fila,1) = "" AndHoja5.Cells(Fila,1) = "" Then Final = Fila- 1 ExitFor EndIf Next For Fila= 2 To Final If ComboBox1= Hoja2.Cells(Fila,1) Then Me.txt_Nombre =Hoja2.Cells(Fila,2) ExitFor EndIf Next
  • 2. For Fila= 2 To Final If ComboBox1= Hoja5.Cells(Fila,1) Then Me.txt_Saldo=Hoja5.Cells(Fila,3) ExitFor EndIf Next End Sub Private SubComboBox1_Enter() DimFilaAs Integer DimFinal As Integer DimLista As String For Fila= 1 To ComboBox1.ListCount ComboBox1.RemoveItem0 NextFila For Fila= 2 To 1000 If Hoja2.Cells(Fila,1) = "" Then Final = Fila- 1 ExitFor EndIf Next
  • 3. For Fila= 2 To Final Lista= Hoja2.Cells(Fila,1) ComboBox1.AddItem(Lista) Next End Sub Private SubCommandButton1_Click() DimFilaAs Integer DimFinal As Integer DimExistenciaAsInteger DimTotal AsInteger For Fila= 2 To 1000 If Hoja3.Cells(Fila,1) = "" Then Final = Fila ExitFor EndIf Next Hoja3.Cells(Final,1) = Me.ComboBox1 Hoja3.Cells(Final,2) = Me.txt_Nombre Hoja3.Cells(Final,3) = Me.txt_FechaIng Hoja3.Cells(Final,4) = Me.txt_Factura
  • 4. Hoja3.Cells(Final,5) = Me.txt_Proveedor Hoja3.Cells(Final,6) = Me.txt_Cantidad For Fila= 2 To 1000 If Hoja5.Cells(Fila,1) = Hoja3.Cells(Final,1) Then Existencia=Hoja5.Cells(Fila,3) Total = Me.txt_Cantidad+Existencia Hoja5.Cells(Fila,3) = Total ExitFor EndIf Next Me.ComboBox1="" Me.txt_Nombre ="" Me.txt_FechaIng="" Me.txt_Factura= "" Me.txt_Proveedor="" Me.txt_Cantidad="" End Sub Private SubCommandButton2_Click() UnloadMe End Sub
  • 5. CODIGO frm_Menu Private SubCommandButton1_Click() frm_RegistrarProducto.Show End Sub Private SubCommandButton2_Click() frm_ModificarProducto.Show End Sub Private SubCommandButton3_Click() frm_Entradas.Show End Sub CODIGO frm_ModificarProducto Private SubComboBox1_Change() DimFilaAs Integer DimFinal As Integer If ComboBox1.Value="" Then Me.txt_Nombre ="" Me.txt_Descrip= "" End If For Fila= 2 To 1000 If Hoja2.Cells(Fila,1) = "" Then Final = Fila- 1 ExitFor EndIf Next
  • 6. For Fila= 2 To Final If ComboBox1= Hoja2.Cells(Fila,1) Then Me.txt_Nombre =Hoja2.Cells(Fila,2) Me.txt_Descrip=Hoja2.Cells(Fila,3) ExitFor EndIf Next End Sub Private SubComboBox1_Enter() DimFilaAs Integer DimFinal As Integer DimLista As String For Fila= 1 To ComboBox1.ListCount ComboBox1.RemoveItem0 NextFila For Fila= 2 To 1000 If Hoja2.Cells(Fila,1) = "" Then Final = Fila- 1 ExitFor
  • 7. EndIf Next For Fila= 2 To Final Lista= Hoja2.Cells(Fila,1) ComboBox1.AddItem(Lista) Next End Sub Private SubCommandButton1_Click() Dim FilaAsInteger Dim Final AsInteger For Fila= 2 To 1000 If Hoja2.Cells(Fila,1) = "" AndHoja3.Cells(Fila,1) = "" AndHoja5.Cells(Fila,1) ="" Then Final = Fila- 1 ExitFor EndIf Next For Fila= 2 To Final If Me.ComboBox1= Hoja2.Cells(Fila, 1) Then Hoja2.Cells(Fila,2) = Me.txt_Nombre Hoja2.Cells(Fila,3) = Me.txt_Descrip
  • 8. ExitFor EndIf Next '------------------------------------------------- For Fila= 2 To Final If Me.ComboBox1= Hoja3.Cells(Fila,1) Then Hoja3.Cells(Fila,2) = Me.txt_Nombre EndIf Next For Fila= 2 To Final If Me.ComboBox1= Hoja5.Cells(Fila,1) Then Hoja5.Cells(Fila,2) = Me.txt_Nombre ExitFor EndIf Next '------------------------------------------------- Me.ComboBox1= "" Me.txt_Nombre ="" Me.txt_Descrip= ""
  • 9. End Sub Private SubCommandButton2_Click() UnloadMe End Sub CODIGO frm_RegistrarProducto Private SubCommandButton1_Click() Dim FilaAsInteger Dim Final AsInteger Dim RegistroAsInteger ForFila= 1 To 1000 If Hoja2.Cells(Fila,1) = "" Then Final = Fila ExitFor End If Next ForRegistro= 2 To Final If Hoja2.Cells(Registro,1) = Me.txt_CodProdThen Me.txt_CodProd.BackColor=&H8080FF MsgBox ("Registroyaexiste"+Chr(13) + "Ingrese uncódigodiferente") Me.txt_CodProd.SetFocus
  • 10. ExitSub ExitFor End If Next If MsgBox("Soncorrectoslosdatos?"+ Chr(13) + "Deseaproceder?",vbOKCancel) =vbOKThen Me.txt_CodProd.BackColor=&HFFFFFF Hoja2.Cells(Final,1) = Me.txt_CodProd Hoja2.Cells(Final,2) = Me.txt_Nombre Hoja2.Cells(Final,3) = Me.txt_Descrip '----------------------------------------------- Hoja5.Cells(Final,1) = Me.txt_CodProd Hoja5.Cells(Final,2) = Me.txt_Nombre Hoja5.Cells(Final,3) = 0 '----------------------------------------------- Me.txt_CodProd="" Me.txt_Nombre ="" Me.txt_Descrip= "" Me.txt_CodProd.SetFocus Else ExitSub End If End Sub Private Sub CommandButton2_Click() UnloadMe