Moderatori: Anthony47, Flash30005
Private Sub mCaricaListBox(ByVal s As String)
Dim lRiga As Long
Dim lng As Long
With sh
lRiga = .Range("A" & .Rows.Count).End(xlUp).Row
End With
With Me.ListBox1
If s = "CaricaDati" Then
For lng = 2 To lRiga
.AddItem (sh.Range("A" & lng).Value)
Next
ElseIf s = "FiltraDati" Then
.Clear
For lng = 2 To lRiga
If Left(sh.Range("A" & lng).Value, Len(Me.TextBox1.Text)) = Me.TextBox1.Text Then
.AddItem sh.Range("A" & lng).Value
End If
Next
End If
End With
End Sub
If InStr(1, sh.Range("A" & lng).Value, Me.TextBox1.Text, vbTextCompare) > 0 Then
.AddItem sh.Range("A" & lng).Value
.AddItem sh.Range("A" & lng).Value & "-/-" & sh.Range("B" & lng).Value
Private Sub ListBox1_Click()
Dim MyStr As String
Dim ur As Long
Dim tabella As Range
ur = ThisWorkbook.Worksheets("Foglio2").Cells(Rows.Count, 1).End(xlUp).Row
Set tabella = Worksheets("Foglio2").Range("a2:b" & ur)
Application.EnableEvents = False
MyStr = UserForm1.ListBox1.Value
ActiveCell.Value = Left(MyStr, InStr(MyStr, "-/-") - 1)
ActiveCell.Offset(0, 1).Value = Right(MyStr, Len(MyStr) - InStr(MyStr, "-/-") - 2)
ActiveCell.Offset(0, -1).Value = Date
UserForm1.TextBox1.Value = ""
UserForm1.Hide
Application.EnableEvents = True
End Sub
ActiveCell.Value = Left(MyStr, InStr(MyStr, "-/-") - 1)
ActiveCell.Offset(0, 1).Value = Right(MyStr, Len(MyStr) - InStr(MyStr, "-/-") - 2)
Ma vedrai che alle 03.15 Anthony si farà vivo.
Torna a Applicazioni Office Windows
Excel: formula automatica per evidenziare prodotto scaduto Autore: gamma_ray |
Forum: Applicazioni Office Windows Risposte: 3 |
Salvare file excel in formato html escludendo le immagini Autore: systemcrack |
Forum: Applicazioni Office Windows Risposte: 10 |
formula excel non visualizza risultato Autore: tommasog |
Forum: Applicazioni Office Windows Risposte: 6 |
Excel 2016 - Funzione SCARTO + INDIRETTO Autore: pl1957 |
Forum: Applicazioni Office Windows Risposte: 2 |
Visitano il forum: Carletto Ribolla e 42 ospiti