'FORM1
'--------------------------------------------------------
Private Sub cmdVai_Click()
If (opt1.Value = True) Then
Unload Me
frm2.Show
Foglio8.Select 'selezioni Foglio8
Foglio8.Range("E8") = ListBox1.Column(0) 'ASSEGNA IL VALORE SELEZIONATO DELLA LISTBOX1 ALLA CELLA E8
ElseIf (opt2.Value = True) Then
Foglio9.Select 'Altrimenti selezioni Foglio9
Foglio9.Range("E8") = ListBox1.Column(0) 'ASSEGNA IL VALORE SELEZIONATO DELLA LISTBOX1 ALLA CELLA E8
ElseIf (opt6.Value = True) Then
Foglio10.Select 'Altrimenti selezioni Foglio10
Foglio10.Range("E8") = ListBox1.Column(0) 'ASSEGNA IL VALORE SELEZIONATO DELLA LISTBOX1 ALLA CELLA E8
Exit Sub
End If
Unload Me
frmStampanti.Show vbModeless
End Sub
'-------------------------------------
Private Sub UserForm_QueryClose(cancel As Integer, CloseMode As Integer)
If CloseMode = vbFormControlMenu Then
cancel = True
End If
End Sub
'----------------------------
Private Sub cmdChiudi_Click()
Unload Me
Worksheets("GENERALE").Select
End Sub
'==========================================
'FORM2
'------------------------------------------------------
Private Sub cmdChiudi_Click()
Unload Me
frm1.Show
'Worksheets("GENERALE").Select
End Sub
'----------------------------------------------------
Private Sub opt1_Click()
Foglio8.Range("E131") = Foglio2.Range("Q2")
frm2.Hide
End Sub
'----------------------------------------------------
Private Sub opt2_Click()
Foglio8.Range("E131") = Foglio2.Range("Q3")
frm2.Hide
End Sub
'---------------------------------------------------
Private Sub UserForm_Activate()
Call ClearOptionButton
End Sub
Private Sub UserForm_QueryClose(cancel As Integer, CloseMode As Integer)
If CloseMode = vbFormControlMenu Then
cancel = True
End If
End Sub
Sub ClearOptionButton()
opt1.Value = False
opt2.Value = False
End Sub
|