#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Edit mode

How do I detect whether a worksheet/workbook/window is in edit mode? In
other words, the user has unfinished editing in a cell.
How do I force an end to edit mode? How do I force acceptance of the new
cell data? How do I cancel the edit?
This is important to me, because my application controlling the Excel
application fails ("call was rejected by the callee") when the user clicks
one of my buttons when there is unfinished editing in a cell.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default Edit mode

This was posted by Jan Karel Pieterse:


Hi,

Try this:

Function ExcelInEditMode() As Boolean
ExcelInEditMode=(Application.CommandBars
(1).FindControl _
(ID:=23, Recursive:=True).Enabled=True)
End Function

Regards,

Jan Karel Pieterse
Excel TA/MVP

in this thread:
http://google.com/groups?threadm=070...0a% 40phx.gbl

If you look at the toolbar while you're editing a cell, you'll see lots of
controls are disabled.

Ken Travers wrote:

How do I detect whether a worksheet/workbook/window is in edit mode? In
other words, the user has unfinished editing in a cell.
How do I force an end to edit mode? How do I force acceptance of the new
cell data? How do I cancel the edit?
This is important to me, because my application controlling the Excel
application fails ("call was rejected by the callee") when the user clicks
one of my buttons when there is unfinished editing in a cell.


--

Dave Peterson

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Edit mode

Thank you for your suggestion Jan/Dave. Sometimes I am amazed at the
lengths we have to go to, to get around something that Microsoft has failed
to provide.

Sadly, your approach does not work in my environment, which is APL+Win
controlling Excel. When the worksheet is in edit mode, all calls to the
Excel interface are rejected. Seems I need to take the problem to the APL
people.

Best wishes
Ken T.


This was posted by Jan Karel Pieterse:


Hi,

Try this:

Function ExcelInEditMode() As Boolean
ExcelInEditMode=(Application.CommandBars
(1).FindControl _
(ID:=23, Recursive:=True).Enabled=True)
End Function

Regards,

Jan Karel Pieterse
Excel TA/MVP

in this thread:

http://google.com/groups?threadm=070...0a% 40phx.gbl

If you look at the toolbar while you're editing a cell, you'll see lots of
controls are disabled.

Ken Travers wrote:

How do I detect whether a worksheet/workbook/window is in edit mode? In
other words, the user has unfinished editing in a cell.
How do I force an end to edit mode? How do I force acceptance of the

new
cell data? How do I cancel the edit?
This is important to me, because my application controlling the Excel
application fails ("call was rejected by the callee") when the user

clicks
one of my buttons when there is unfinished editing in a cell.


--

Dave Peterson



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I know you can't run a macro while in edit mode, but... [email protected] Excel Discussion (Misc queries) 5 July 21st 06 03:40 AM
Cursor in edit mode cinvic Excel Discussion (Misc queries) 3 February 12th 06 03:44 PM
Combo Box goes to edit mode even if design mode is in OFF position Chas Excel Discussion (Misc queries) 0 January 7th 05 07:21 PM
Edit Mode Nicke[_8_] Excel Programming 0 October 15th 04 12:49 PM
Edit Mode Nicke[_5_] Excel Programming 1 October 15th 04 11:59 AM


All times are GMT +1. The time now is 02:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"