Thread: Form trouble
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Oreg[_9_] Oreg[_9_] is offline
external usenet poster
 
Posts: 1
Default Form trouble

Hi,

With help on this board, I've been able to create a form with
comboboxes and listboxes that enters data in the next empty row of a
sheet named "METRO".
partial code below:

Private Sub ADD_Click()
Dim r As Long
Dim ws As Worksheet
Set ws = Worksheets("METRO")
r = ws.Cells(Rows.Count, 5).End(xlUp).Offset(1, 0).Row
ws.Range("C" & r).Value = ComboBox1.Value
ws.Range("E" & r).Value = rngsw.Value
ws.Range("F" & r).Value = rngfail.Value
ws.Range("H" & r).Value = ComboBox2.Value
ws.Range("I" & r).Value = ComboBox3.Value
ws.Range("J" & r).Value = ComboBox4.Value
ws.Range("K" & r).Value = ComboBox5.Value
ws.Range("L" & r).Value = ComboBox6.Value
ws.Range("T" & r).Value = ComboBox7.Value
ws.Range("AA" & r).Value = ComboBox8.Value
ws.Range("AD" & r).Value = Timestart.Value
ws.Range("AE" & r).Value = Timeend.Value
ws.Range("M" & r).Value = ComboBox9.Value
ComboBox1.Value = ""
rngsw.Value = ""
rngfail.Value = ""
ComboBox7.Value = ""
ComboBox8.Value = ""
Timestart.Value = ""
Timeend.Value = ""
ComboBox9.Value = ""
ComboBox2.SetFocus
Unload CIDATA
CIDATA.Show

End Sub
If possible, I would like to create a similar form which lists rows
that contain a "Y" in column E.

Any Ideas?
Thanks


---
Message posted from http://www.ExcelForum.com/