Thread: Edit mode
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Ken Travers Ken Travers is offline
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