modeless userform

D

Dawna

Good Morning,

I have a userform that is shown modeless, which works great at first. If
there are multiple entries, I'm clearing some of the text/combo boxes and
setting focus to a specific Textbox within the userform for the next entry.
At this point, the user can no longer click outside of the userform. Any
suggestions on how to maintain the modeless userform?
 
R

Rick Rothstein

Can you show us your code (especially where it relates to showing the
UserForm)? It sounds like you may be showing the UserForm without the
modeless argument somewhere.
 
D

Dawna

This code is in ThisWorkbook

Private Sub Workbook_Open()
Sheets("2006-2009").Select
Set rRng = Range("A" & Range("A" & Rows.Count).End(xlUp).Row)
With rRng.Offset(rRng.Count + 0, 0).Select
UserForm1.Show vbModeless
End With
End Sub
 
D

Dawna

Rick,
This is a shortened version of the code when the user can no longer work
around the userform.

Private Sub Cmdnext_Click()

LastRow = Range("A" & Rows.Count).End(xlUp).Row
newrow = LastRow + 1
Range("A" & newrow) = Me.TBRecDate
Range("B" & newrow) = Me.TbDate
Range("F" & newrow) = Me.TbBatch
Range("G" & newrow) = Me.TbSN
Range("L" & newrow) = Me.TBreject
Range("Q" & newrow) = Me.cboDisposition


'Clear fields for next entry
Me.TbSN = ClearContents
Me.TBreject = ClearContents
Me.cboDisposition = ClearContents
Me.TbSN.SetFocus
End Sub
 
M

Mike Fogleman

I don't think you can set a textbox = to ClearContents
Try
Me.TbSN.Text = ""

Mike F
 

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