View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gert-Jan Gert-Jan is offline
external usenet poster
 
Posts: 49
Default View values; ignore header database

Problem solved:

Private Sub ComboBox1_Change()
If Range("Sheet3!A2") = "" Then
Exit Sub
Else
Sheets("Sheet3").Select
Dim i As Long 'Index
i = ComboBox1.ListIndex + 1
vrijwap = Cells(i +1, 5).Value



"Gert-Jan" schreef in bericht
...
In a database (Sheet3) I have values in some columns. In row 1 there are
headers. I created a userform to view al the values. How should the
userform ignore the first line; the headers are not very interesting...

Private Sub ComboBox1_Change()
If Range("Sheet3!A2") = "" Then
Exit Sub
Else
Sheets("Sheet3").Select
Dim i As Long 'Index
i = ComboBox1.ListIndex + 1
vrijwap = Cells(i, 5).Value
...
...
volgende.Enabled = i < ComboBox1.ListCount
vorige.Enabled = i 1