ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to force users out of edit mode? (https://www.excelbanter.com/excel-programming/399610-how-force-users-out-edit-mode.html)

[email protected]

How to force users out of edit mode?
 
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?


Corey

How to force users out of edit mode?
 
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....

wrote in message
oups.com...
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?



[email protected]

How to force users out of edit mode?
 
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.

Corey wrote:
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....

wrote in message
oups.com...
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?




All times are GMT +1. The time now is 01:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com