Live-Forum - Die aktuellen Beiträge
Datum
Titel
28.03.2024 21:12:36
28.03.2024 18:31:49
Anzeige
Archiv - Navigation
1876to1880
Aktuelles Verzeichnis
Verzeichnis Index
Übersicht Verzeichnisse
Vorheriger Thread
Rückwärts Blättern
Nächster Thread
Vorwärts blättern
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
Inhaltsverzeichnis

Eingabe auf bestimmte Anzahl beschränken

Eingabe auf bestimmte Anzahl beschränken
03.04.2022 14:18:35
Nader
Hallo Yal,
vielen Dank für deine rasche Antwort
Leider könnte ich deine Routine noch nicht in meinem bestehenden Code benutzen, weil ich nicht genau weiß, wo deine Routine
eingesetzt wird.
Kannst du mir bitte dabei behilflich sein und mir zeigen, wo ich die Routine einsetzen kann?
Meine Routine:
Option Explicit

Private Sub CommandButton1_Click()
Unload UF_Status_Vorbestellungen
End Sub

Private Sub CommandButton2_Click()
Dim SuchDatum As Variant
Dim Rng As Range
'Teil (1) Pivot Tabelle aktualisieren
Sheets("Tabelle4").Activate
ThisWorkbook.RefreshAll
'Teil (2) Eingabe vom Datum über Inputbox
SuchDatum = InputBox("Datum eingeben!")
If IsDate(SuchDatum) Then
With Sheets("Tabelle1").Range("A:A")
Set Rng = .Find(What:=CStr(SuchDatum), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If Not Rng Is Nothing Then
Application.Goto Rng, True 'value found
Sheets("Tabelle4").PivotTables("PivotTable1").PivotFields("Datum").CurrentPage = SuchDatum
Else
Dim iCounter As Integer
For iCounter = 64 To 64
MsgBox "Das gewählte Datum ist nicht vorhanden!", iCounter, "Information..."
Next iCounter
End If
End With
End If
End Sub

Private Sub UserForm_Initialize()
'Anzeigen ListBox1
Dim lLetzte1  As Long
Application.ScreenUpdating = False
ListBox1.Clear
With Worksheets("Tabelle4")
lLetzte1 = .Cells(Rows.Count, 1).End(xlUp).Row
With Me.ListBox1
.ColumnCount = 4
' ListBox1.Selected(0) = True
.ColumnHeads = False
.Font.Size = 18
ListBox1.RowSource = "Tabelle4!A4:K4" & lLetzte1
End With
End With
Application.ScreenUpdating = True
ListBox1.ColumnWidths = "12,0 Cm;8,0 Cm;2,0 Cm;5,0 Cm"
End Sub
Ich danke dir Vielmals
Gruß
Nader

1
Beitrag zum Forumthread
Beitrag zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige

Links zu Excel-Dialogen

Beliebteste Forumthreads (12 Monate)

Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige