How to force users out of edit mode?

R

redrick

I have users who don't press Enter (or move to a new cell) after
entering text. They then try to click a form button - and of course -
the macro does not run.
Is there an xl/vba solution to force them out of edit mode before
clicking the button?
 
C

Corey

Few ways to get around it.
.....
Add in the first part of the EXIT Code something like

Private Sub CommandButton1_Click()
CommandButton1.SetFocus
Sheet1.Range("A1").Value = TextBox1.Value
.... Othe code
Unload Me
End Sub

Corey....

I have users who don't press Enter (or move to a new cell) after
entering text. They then try to click a form button - and of course -
the macro does not run.
Is there an xl/vba solution to force them out of edit mode before
clicking the button?
 
R

redrick

Thanks Corey,
That will work on a form but not in a cell.
By form in the original post I meant a button from the Forms toolbar
not from the Control Toolbox.
 

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