Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default How do I detect cell mode?

I am looking for any advice as to how to detect cell mode. How to I
detect that cell in edit mode?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default How do I detect cell mode?

the file=Open option in the menu will be disabled.

--
Regards,
Tom Ogilvy


" wrote:

I am looking for any advice as to how to detect cell mode. How to I
detect that cell in edit mode?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default How do I detect cell mode?


Tom Ogilvy wrote:
the file=Open option in the menu will be disabled.

--
Regards,
Tom Ogilvy


" wrote:

I am looking for any advice as to how to detect cell mode. How to I
detect that cell in edit mode?



But I need detect cell mode in my c# code...

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default How do I detect cell mode?

You should be able to check the status of the menu item in your c# code.

--
Regards,
Tom Ogilvy


" wrote:


Tom Ogilvy wrote:
the file=Open option in the menu will be disabled.

--
Regards,
Tom Ogilvy


" wrote:

I am looking for any advice as to how to detect cell mode. How to I
detect that cell in edit mode?



But I need detect cell mode in my c# code...


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default How do I detect cell mode?

Not something I have used, but you can check and see if checking the ready
property of the application object will indicate this:

Sub UseReady()

If Application.Ready = True Then
MsgBox "Application is ready."
Else
MsgBox "Application is not ready."
End If

End Sub

However in one thread someone said it returned true regardless of the state
of edit mode. The Ready property is in xl2002 and later. \

this is vba code to check the state of the Open menu item if you want to try
and to it in C#.

Dim C As Office.CommandBarControl
Set C = Application.CommandBars.FindControl(ID:=23) ' Open
button
If C.Enabled = True Then
Debug.Print Now, "Not Edit Mode"
Else
Debug.Print Now, "Edit Mode"
End If




--
Regards,
Tom Ogilvy


" wrote:


Tom Ogilvy wrote:
the file=Open option in the menu will be disabled.

--
Regards,
Tom Ogilvy


" wrote:

I am looking for any advice as to how to detect cell mode. How to I
detect that cell in edit mode?



But I need detect cell mode in my c# code...




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default How do I detect cell mode?


Tom Ogilvy wrote:
Not something I have used, but you can check and see if checking the ready
property of the application object will indicate this:

Sub UseReady()

If Application.Ready = True Then
MsgBox "Application is ready."
Else
MsgBox "Application is not ready."
End If

End Sub

However in one thread someone said it returned true regardless of the state
of edit mode. The Ready property is in xl2002 and later. \

this is vba code to check the state of the Open menu item if you want to try
and to it in C#.

Dim C As Office.CommandBarControl
Set C = Application.CommandBars.FindControl(ID:=23) ' Open
button
If C.Enabled = True Then
Debug.Print Now, "Not Edit Mode"
Else
Debug.Print Now, "Edit Mode"
End If




--
Regards,
Tom Ogilvy


" wrote:


Tom Ogilvy wrote:
the file=Open option in the menu will be disabled.

--
Regards,
Tom Ogilvy


" wrote:

I am looking for any advice as to how to detect cell mode. How to I
detect that cell in edit mode?



But I need detect cell mode in my c# code...



Thanks, Tom! Great solution of my problem!

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
detect ctrl-c was pressed (in copy mode) from vba? Mad Scientist Jr Excel Discussion (Misc queries) 3 October 29th 06 06:34 AM
Detect Cell Changes aga2957[_5_] Excel Programming 4 August 21st 06 06:03 AM
How can I detect if user is in Group Mode when a macro starts? R-N Excel Programming 5 June 15th 04 01:16 PM
Detect event if excel is in edit mode. Rajeev Excel Programming 2 February 7th 04 02:22 PM
Detect Group mode Tim Aurthur Excel Programming 3 October 22nd 03 06:17 PM


All times are GMT +1. The time now is 06:41 AM.

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

About Us

"It's about Microsoft Excel"