Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LASER CODE
- Private Sub CommandButton1_Click()
- ThisWorkbook.Sheets("LASER DATE").Activate
- If TPM_ERG.calendartext.value = "78" Then
- If m_1.value <> "" Or m_2.value = Format(Now, "dd mmmm yyyy") Or m_3.value = Format(Now, "dd mmmm yyyy") Or SPIRAL.m_1.value <> "" And m_2.value = Format(Now, "dd mmmm yyyy") And m_3.value = Format(Now, "dd mmmm yyyy") Then
- Range("B3") = m_1.value
- Range("B4") = m_2.value
- Range("B5") = m_3.value
- TPM_ERG.lasertextbox1.value = m_1.value
- TPM_ERG.lasertextbox2.value = m_2.value
- TPM_ERG.lasertextbox3.value = m_3.value
- MsgBox "Data Saved", vbInformation
- Else
- MsgBox "Data Is Empty", vbInformation
- End If
- ElseIf TPM_ERG.calendartext.value = "79" Then
- If m_1.value <> "" Or m_2.value = Format(Now, "dd mmmm yyyy") Or m_3.value = Format(Now, "dd mmmm yyyy") Or SPIRAL.m_1.value <> "" And m_2.value = Format(Now, "dd mmmm yyyy") And m_3.value = Format(Now, "dd mmmm yyyy") Then
- Range("C3") = m_1.value
- Range("C4") = m_2.value
- Range("C5") = m_3.value
- TPM_ERG.lasertextbox4.value = m_1.value
- TPM_ERG.lasertextbox5.value = m_2.value
- TPM_ERG.lasertextbox6.value = m_3.value
- MsgBox "Data Saved", vbInformation
- Else
- MsgBox "Data Is Empty", vbInformation
- End If
- ElseIf TPM_ERG.calendartext.value = "80" Then
- If m_1.value <> "" Or m_2.value = Format(Now, "dd mmmm yyyy") Or m_3.value = Format(Now, "dd mmmm yyyy") Or SPIRAL.m_1.value <> "" And m_2.value = Format(Now, "dd mmmm yyyy") And m_3.value = Format(Now, "dd mmmm yyyy") Then
- Range("D3") = m_1.value
- Range("D4") = m_2.value
- Range("D5") = m_3.value
- TPM_ERG.lasertextbox7.value = m_1.value
- TPM_ERG.lasertextbox8.value = m_2.value
- TPM_ERG.lasertextbox9.value = m_3.value
- MsgBox "Data Saved", vbInformation
- Else
- MsgBox "Data Is Empty", vbInformation
- End If
- ElseIf TPM_ERG.calendartext.value = "81" Then
- If m_1.value <> "" Or m_2.value = Format(Now, "dd mmmm yyyy") Or m_3.value = Format(Now, "dd mmmm yyyy") Or SPIRAL.m_1.value <> "" And m_2.value = Format(Now, "dd mmmm yyyy") And m_3.value = Format(Now, "dd mmmm yyyy") Then
- Range("E3") = m_1.value
- Range("E4") = m_2.value
- Range("E5") = m_3.value
- TPM_ERG.lasertextbox10.value = m_1.value
- TPM_ERG.lasertextbox11.value = m_2.value
- TPM_ERG.lasertextbox12.value = m_3.value
- MsgBox "Data Saved", vbInformation
- Else
- MsgBox "Data Is Empty", vbInformation
- End If
- ElseIf TPM_ERG.calendartext.value = "82" Then
- If m_1.value <> "" Or m_2.value = Format(Now, "dd mmmm yyyy") Or m_3.value = Format(Now, "dd mmmm yyyy") Or SPIRAL.m_1.value <> "" And m_2.value = Format(Now, "dd mmmm yyyy") And m_3.value = Format(Now, "dd mmmm yyyy") Then
- Range("F3") = m_1.value
- Range("F4") = m_2.value
- Range("F5") = m_3.value
- TPM_ERG.lasertextbox13.value = m_1.value
- TPM_ERG.lasertextbox14.value = m_2.value
- TPM_ERG.lasertextbox15.value = m_3.value
- MsgBox "Data Saved", vbInformation
- Else
- MsgBox "Data Is Empty", vbInformation
- End If
- ElseIf TPM_ERG.calendartext.value = "83" Then
- If m_1.value <> "" Or m_2.value = Format(Now, "dd mmmm yyyy") Or m_3.value = Format(Now, "dd mmmm yyyy") Or SPIRAL.m_1.value <> "" And m_2.value = Format(Now, "dd mmmm yyyy") And m_3.value = Format(Now, "dd mmmm yyyy") Then
- Range("G3") = m_1.value
- Range("G4") = m_2.value
- Range("G5") = m_3.value
- TPM_ERG.lasertextbox16.value = m_1.value
- TPM_ERG.lasertextbox17.value = m_2.value
- TPM_ERG.lasertextbox18.value = m_3.value
- MsgBox "Data Saved", vbInformation
- Else
- MsgBox "Data Is Empty", vbInformation
- End If
- End If
- End Sub
- Private Sub CommandButton2_Click()
- ThisWorkbook.Sheets("LASER DATE").Activate
- If TPM_ERG.calendartext.value = "78" Then
- Range("B3").value = ""
- Range("B4").value = ""
- Range("B5").value = ""
- TPM_ERG.lasertextbox1.value = ""
- TPM_ERG.lasertextbox2.value = ""
- TPM_ERG.lasertextbox3.value = ""
- m_1.value = ""
- m_2.value = ""
- m_3.value = ""
- MsgBox "Data Clear", vbInformation
- ElseIf TPM_ERG.calendartext.value = "79" Then
- Range("C3").value = ""
- Range("C4").value = ""
- Range("C5").value = ""
- TPM_ERG.lasertextbox4.value = ""
- TPM_ERG.lasertextbox5.value = ""
- TPM_ERG.lasertextbox6.value = ""
- m_1.value = ""
- m_2.value = ""
- m_3.value = ""
- MsgBox "Data Clear", vbInformation
- ElseIf TPM_ERG.calendartext.value = "80" Then
- Range("D3").value = ""
- Range("D4").value = ""
- Range("D5").value = ""
- TPM_ERG.lasertextbox7.value = ""
- TPM_ERG.lasertextbox8.value = ""
- TPM_ERG.lasertextbox9.value = ""
- m_1.value = ""
- m_2.value = ""
- m_3.value = ""
- MsgBox "Data Clear", vbInformation
- ElseIf TPM_ERG.calendartext.value = "81" Then
- Range("E3").value = ""
- Range("E4").value = ""
- Range("E5").value = ""
- TPM_ERG.lasertextbox10.value = ""
- TPM_ERG.lasertextbox11.value = ""
- TPM_ERG.lasertextbox12.value = ""
- m_1.value = ""
- m_2.value = ""
- m_3.value = ""
- MsgBox "Data Clear", vbInformation
- ElseIf TPM_ERG.calendartext.value = "82" Then
- Range("F3").value = ""
- Range("F4").value = ""
- Range("F5").value = ""
- TPM_ERG.lasertextbox13.value = ""
- TPM_ERG.lasertextbox14.value = ""
- TPM_ERG.lasertextbox15.value = ""
- m_1.value = ""
- m_2.value = ""
- m_3.value = ""
- MsgBox "Data Clear", vbInformation
- ElseIf TPM_ERG.calendartext.value = "83" Then
- Range("G3").value = ""
- Range("G4").value = ""
- Range("G5").value = ""
- TPM_ERG.lasertextbox16.value = ""
- TPM_ERG.lasertextbox17.value = ""
- TPM_ERG.lasertextbox18.value = ""
- m_1.value = ""
- m_2.value = ""
- m_3.value = ""
- MsgBox "Data Clear", vbInformation
- End If
- End Sub
- Private Sub m_1_Enter()
- m_1.value = " "
- ThisWorkbook.Sheets("Sheet1").Activate
- Range("A1").Select
- frmCalendar.Show_Cal
- End Sub
- Private Sub m_btn_finish_Click()
- If m_1.value <> "" Then
- m_3.value = Format(Now, "dd mmmm yyyy")
- Else
- MsgBox "Plan Is Empty ", vbInformation
- End If
- End Sub
- Private Sub m_btn_start_Click()
- If m_1.value <> "" Then
- m_2.value = Format(Now, "dd mmmm yyyy")
- Else
- MsgBox "Plan Is Empty ", vbInformation
- End If
- End Sub
- Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
- m_1.value = ""
- m_2.value = ""
- m_3.value = ""
- mach_EE.value = ""
- ThisWorkbook.Sheets("MAINTENANCE SKILL").Activate
- If Range("B21").value = "99,1%" Then
- Range("B21").value = "100%"
- ElseIf Range("C21").value = "99,1%" Then
- Range("C21").value = "100%"
- ElseIf Range("D21").value = "99,1%" Then
- Range("D21").value = "100%"
- ElseIf Range("E21").value = "99,1%" Then
- Range("E21").value = "100%"
- ElseIf Range("F21").value = "99,1%" Then
- Range("F21").value = "100%"
- End If
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement