Delete an Item in a list box

  • Thread starter Fred Jacobowitz
  • Start date
F

Fred Jacobowitz

Is it possible to select a line in a textbox and the delete it using vba. I
would like to simulate the user clicking a row in a textbox and then
entering the delete key? The textbox is not on a 'form' but rather on the
spreadsheet. Does it matter?

The textbox was loaded using something like.

If TextBox1.CanPaste = True Then
TextBox1.WordWrap = False
TextBox1.MultiLine = True
TextBox1.ScrollBars = fmScrollBarsBoth
TextBox1.Text = ""
TextBox1.Paste
end if
Thank you,
Fred Jacobowitz
 
R

ross

Try looking at selection, or active selection,
textbox1.seltext.delete ? might work, be somthing like this there is
also CurLine prop. might be able to do something with that.
 

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