coding tech

X

x taol

Sub sb(lb As MSForms.ListBox, bDel As Boolean)
msg = MsgBox("is it continue?", vbYesNo, "")
If msg = vbNo Then Exit Sub
For i = 1 To lb.ListCount - 1
If lb.Selected(i - 1) Then Call sbxx(lb.List(i - 1), bDel)
Next
Application.CutCopyMode = False
End Sub

Private Sub cmdDelDes_Click()
msg = MsgBox("is it continue?", vbYesNo, "")
If msg = vbNo Then Exit Sub
xx=1
End Sub

i want to make the sub routine.
2 lines of the upper code make function.

namely,

Sub sb(lb As MSForms.ListBox, bDel As Boolean)
call sby
For i = 1 To lb.ListCount - 1
If lb.Selected(i - 1) Then Call sbxx(lb.List(i - 1), bDel)
Next
Application.CutCopyMode = False
End Sub

Private Sub cmdDelDes_Click()
call sby
xx=1
End Sub

sub sby
~~~~~~
end sub


*** Sent via Developersdex http://www.developersdex.com ***
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top