View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
unplugs[_29_] unplugs[_29_] is offline
external usenet poster
 
Posts: 1
Default SELECT, ERASE, EDIT items in listbox

Besides the multiple access in excel(still havn't solve the problem..
), I got another question want to throw to this group.. :<

I got 2 button in a userform... 1 is Erase button, and 1 is Edi
button. Both of this 2 button will delete the row that I choose i
listbox, how am I going to program this 2 button? Below is the cod
that used to select item and display which item u choose... But I dunn
how to delete the row that I choose... The rowsource for the listbox i
"ListBox1.RowSource = "Sheet1!range" "



Private Sub EraseButton_Click()
Msg = ""
For i = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(i) Then _
Msg = Msg & ListBox1.List(i) & vbCrLf
Next i
MsgBox "Are you sure u wana delete this Selected row: " & _ vbCrL
& Msg
...
...
End Sub

Please somebody can help me to program this?

And for the Edit button, I want to do such that when I select the ro
in listbox, and click on edit button, the data that stored in th
spreadsheet will appear in the textbox in the userform respectively...


Hope to hear from others.... as I already took so much time in doi
such a userform...My boss is unhappy with tat... :

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