› Excel e gli applicativi Microsoft Office › Ripopolare Option Botton
-
AutoreArticoli
-
Buon sera a tutti
mi son imbattuto in un problema che non so come risolvere,
in pratica ho una userform con Option Botton
e fin qui tutto ok.
il codice per archiviare i dati e il seguente:
RowCount = Worksheets("ElencoCantieri").Range("A" & Rows.Count).End(xlUp).Row
With Worksheets("ElencoCantieri").Range("A1")
.Offset(RowCount, 0).Value = ordine1.Caption
.Offset(RowCount, 1).Value = Cantiere.Value
.Offset(RowCount, 2).Value = committente.Value
.Offset(RowCount, 3).Value = Cod_Cantiere.Value
.Offset(RowCount, 4).Value = Appaltatore.Value
.Offset(RowCount, 5).Value = Nomeimpresa.Value
.Offset(RowCount, 6).Value = ContrattoN.Value
.Offset(RowCount, 7).Value = CDate(DataContr.Value)
.Offset(RowCount, 8).Value = Registrato.Value
.Offset(RowCount, 9).Value = CDate(indata.Value)
.Offset(RowCount, 10).Value = aln.Value
'****************************************************************
'Codice da utilizzare se in qualce textbox ci sono valori in euro
'*****************************************************************
On Error Resume Next
.Offset(RowCount, 11).Value = CDbl(Replace(P1, "€ ", ""))
.Offset(RowCount, 12).Value = CDbl(Replace(P2, "€ ", ""))
.Offset(RowCount, 13).Value = CDbl(Replace(P3, "€ ", ""))
.Offset(RowCount, 14).Value = CDbl(Replace(P4, "€ ", ""))
.Offset(RowCount, 15).Value = CDbl(Replace(PF, "€ ", ""))
'.Offset(RowCount, 4) = CDbl(Replace(importo, "€ ", ""))
'.Offset(RowCount, 8) = Replace(TextBox1.Text, Chr(10), " ")
On Error GoTo 0
If Me.chkContratto.Value = True Then
.Offset(RowCount, 17).Value = "CONTRATTO"
End If
If Me.chkOfferta.Value = True Then
.Offset(RowCount, 17).Value = "OFFERTA"
End If
End With
mentre con il codice qui sotto:
Private Sub CommandButton4_Click()
Dim no_ligne As Integer
Sheets("ElencoCantieri").Activate
If Not ComboBox1.Value = "" Then
no_ligne = ComboBox1.ListIndex + 3
ordine1 = Cells(no_ligne, 1).Value
Cantiere = Cells(no_ligne, 2).Value
committente.Value = Cells(no_ligne, 3).Value
Cod_Cantiere = Cells(no_ligne, 4).Value
Appaltatore = Cells(no_ligne, 5).Value
Nomeimpresa = Cells(no_ligne, 6).Value
ContrattoN = Cells(no_ligne, 7).Value
DataContr = Cells(no_ligne, 8).Value
Registrato = Cells(no_ligne, 9).Value
indata = Cells(no_ligne, 10).Value
aln = Cells(no_ligne, 11).Value
'**************************************************************************
'Codice per confermare il formato di testo in alune textbox dove c'e l'euro
'***************************************************************************
P1 = Format(Cells(no_ligne, 12).Value, "€ #,##0.00")
P2 = Format(Cells(no_ligne, 13).Value, "€ #,##0.00")
P3 = Format(Cells(no_ligne, 14).Value, "€ #,##0.00")
P4 = Format(Cells(no_ligne, 15).Value, "€ #,##0.00")
PF = Format(Cells(no_ligne, 16).Value, "€ #,##0.00")
TextBox4 = Format(Cells(no_ligne, 17).Value, "€ #,##0.00")
' Quantità = Format(Cells(no_ligne, 7), "currency")
' TextBox7 = Format(Cells(no_ligne, 14).Value, "currency")
Else
End If
With Me
.CommandButton3.Enabled = False
.CommandButton6.Enabled = False
End With
End Sub
ricerco i dati dal foglio excel e ripopolo le texbox combobox
ma non riesco a ripopolare l'option botton . qualcuno di voi sa come aiutarmi?
ringrazio anticipatamente per l'aiuto
come mai se scrivo e allego i codici mi vien fuori tutto quel papiro?
se mi date una dritta anche per questo problema ve ne sarei grato.
dodi, come puoi vedere questto forum non funziona più ed è impossibile leggerti, speriamo che Mauro ci faccia ritornare al vecchio forum
Ciao Patel
Condivido.
Il vecchio forum era super perfetto. Grafica semplice e intuitiva.
A farla breve efficiente.
-
AutoreArticoli
