ich hab grad das Archiv durchsucht und kann mein Problem leider nciht lösen:
Ich möchte mit nachstehenden Code (aus diesem Forum) nicht nur Spalte 8 sondern Spalte 1 und 8 anzeigen lassen. Hab schon rumprobiert, aber nix geht...
'#### ComboBox mit ALLEN Mänglen füllen START ####
Dim wbk As Workbook
Dim wks As Worksheet
Dim vRow As Variant
Dim iRow As Integer, iRowT As Integer, iRowL As Integer
Application.ScreenUpdating = False
Set wbk = Workbooks.Open("F:\daten\mängelliste.xls")
'nur mit WhgNr
On Error GoTo zerror
iRowL = 0
iRowT = 0
Set wks = wbk.Sheets(1)
iRowL = wks.Cells(wks.Rows.Count, 8).End(xlUp).Row
Workbooks.Add
For iRow = 1 To iRowL
If wks.Cells(iRow, 3).Value = lbWhg Then
vRow = Application.Match(wks.Cells(iRow, 8).Value, Columns(1), 0)
If IsError(vRow) Then
iRowT = iRowT + 1
Cells(iRowT, 1).Value = wks.Cells(iRow, 8).Value
End If
End If
Next iRow
Range("a1").CurrentRegion.Sort _
key1:=Range("A1"), order1:=xlAscending, Header:=xlNo
With frmAuftrag.cbMängelAlle
.List = Range("A1").CurrentRegion.Value
If .ListCount > 0 Then .ListIndex = 0
End With
zerror:
ActiveWorkbook.Close savechanges:=False
wbk.Close
Set wbk = Nothing
Set wks = Nothing
Application.ScreenUpdating = True
'#### ComboBox mit Mänglen füllen ENDE ####
Viele Grüße aus Hamburg bei bewölkten 18 Grad
Ray