ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   simple excel problem.... (https://www.excelbanter.com/excel-programming/367770-simple-excel-problem.html)

vj5

simple excel problem....
 
how to find out whether the active cell is in edit mode or not?

NickHK

simple excel problem....
 
As we have said many time, code does not run in edit mode.
I suppose you could look at the cell.

NickHK

"vj5" wrote in message
...
how to find out whether the active cell is in edit mode or not?




vj5

simple excel problem....
 
thanks for reply
but my code is working when the cell in edit mode
i wants to know how we can find that cell is in edit mode or normal mode?

"NickHK" wrote:

As we have said many time, code does not run in edit mode.
I suppose you could look at the cell.

NickHK

"vj5" wrote in message
...
how to find out whether the active cell is in edit mode or not?





NickHK

simple excel problem....
 
Show the code that is running in edit mode.

NickHK

"vj5" wrote in message
...
thanks for reply
but my code is working when the cell in edit mode
i wants to know how we can find that cell is in edit mode or normal mode?

"NickHK" wrote:

As we have said many time, code does not run in edit mode.
I suppose you could look at the cell.

NickHK

"vj5" wrote in message
...
how to find out whether the active cell is in edit mode or not?







vj5

simple excel problem....
 
on a button click its runnning:
icrosoft.Office.Interop.Excel._Application appEXL =
(Microsoft.Office.Interop.Excel._Application)appli cationObject;
//.GetType().InvokeMember("Application", BindingFlags.GetProperty, null,
applicationObject, null);
Microsoft.Office.Interop.Excel._Worksheet wkSheet =
(Microsoft.Office.Interop.Excel._Worksheet)appEXL. ActiveWorkbook.ActiveSheet;
..................
during debugging i am findnig l the values like:
?appEXL.ActiveWindow will return :

{System.__ComObject}
[System.__ComObject]: {System.__ComObject}
_DisplayRightToLeft: false
ActiveCell: {System.__ComObject}
ActiveChart: null
ActivePane: {System.__ComObject}
ActiveSheet: {System.__ComObject}
Application: {System.__ComObject}
Caption: "Book1"
Creator: xlCreatorCode
DisplayFormulas: false
DisplayGridlines: true
DisplayHeadings: true
DisplayHorizontalScrollBar: true
DisplayOutline: true
DisplayRightToLeft: false
DisplayVerticalScrollBar: true
DisplayWorkbookTabs: true
DisplayZeros: true
EnableResize: 'appEXL.ActiveWindow.EnableResize' threw an exception of
type 'System.Runtime.InteropServices.COMException'
FreezePanes: false
GridlineColor: 0
GridlineColorIndex: xlColorIndexAutomatic
Height: 177.75
Index: 1
Left: -2.75
OnWindow: 'appEXL.ActiveWindow.OnWindow' threw an exception of type
'System.Runtime.InteropServices.COMException'
Panes: {System.__ComObject}
Parent: {Microsoft.Office.Interop.Excel.WorkbookClass}
RangeSelection: {System.__ComObject}
ScrollColumn: 1
ScrollRow: 1
SelectedSheets: {System.__ComObject}
Selection: {System.__ComObject}
Split: false
SplitColumn: 0
SplitHorizontal: 0.0
SplitRow: 0
SplitVertical: 0.0
TabRatio: 0.6
Top: -22.25
Type: xlWorkbook
UsableHeight: 138.75
UsableWidth: 537.0
View: xlNormalView
Visible: true
VisibleRange: {System.__ComObject}
Width: 556.5
WindowNumber: 1
WindowState: xlMaximized
Zoom: 100.0
but unable to find out whether the cell is in edit mode or not?


"NickHK" wrote:

Show the code that is running in edit mode.

NickHK

"vj5" wrote in message
...
thanks for reply
but my code is working when the cell in edit mode
i wants to know how we can find that cell is in edit mode or normal mode?

"NickHK" wrote:

As we have said many time, code does not run in edit mode.
I suppose you could look at the cell.

NickHK

"vj5" wrote in message
...
how to find out whether the active cell is in edit mode or not?







NickHK

simple excel problem....
 
I don't use .Net/Interop but I do not see any Excel code running <<whilst in
Edit Mode.
If you are talking about multi-threading and your .Net code, that's nothing
to do with Excel
But your code automating Excel will mean the user cannot enter edit mode
until that code has finished.

If you can run any automation code, then you are not in edit mode.
I don't if DDE channels still respond in edit mode, but as using the .Net
Framework, there's no support for DDE AFAIK.

NickHK


"vj5" wrote in message
...
on a button click its runnning:
icrosoft.Office.Interop.Excel._Application appEXL =
(Microsoft.Office.Interop.Excel._Application)appli cationObject;
//.GetType().InvokeMember("Application", BindingFlags.GetProperty, null,
applicationObject, null);
Microsoft.Office.Interop.Excel._Worksheet wkSheet =

(Microsoft.Office.Interop.Excel._Worksheet)appEXL. ActiveWorkbook.ActiveSheet
;
..................
during debugging i am findnig l the values like:
?appEXL.ActiveWindow will return :

{System.__ComObject}
[System.__ComObject]: {System.__ComObject}
_DisplayRightToLeft: false
ActiveCell: {System.__ComObject}
ActiveChart: null
ActivePane: {System.__ComObject}
ActiveSheet: {System.__ComObject}
Application: {System.__ComObject}
Caption: "Book1"
Creator: xlCreatorCode
DisplayFormulas: false
DisplayGridlines: true
DisplayHeadings: true
DisplayHorizontalScrollBar: true
DisplayOutline: true
DisplayRightToLeft: false
DisplayVerticalScrollBar: true
DisplayWorkbookTabs: true
DisplayZeros: true
EnableResize: 'appEXL.ActiveWindow.EnableResize' threw an exception of
type 'System.Runtime.InteropServices.COMException'
FreezePanes: false
GridlineColor: 0
GridlineColorIndex: xlColorIndexAutomatic
Height: 177.75
Index: 1
Left: -2.75
OnWindow: 'appEXL.ActiveWindow.OnWindow' threw an exception of type
'System.Runtime.InteropServices.COMException'
Panes: {System.__ComObject}
Parent: {Microsoft.Office.Interop.Excel.WorkbookClass}
RangeSelection: {System.__ComObject}
ScrollColumn: 1
ScrollRow: 1
SelectedSheets: {System.__ComObject}
Selection: {System.__ComObject}
Split: false
SplitColumn: 0
SplitHorizontal: 0.0
SplitRow: 0
SplitVertical: 0.0
TabRatio: 0.6
Top: -22.25
Type: xlWorkbook
UsableHeight: 138.75
UsableWidth: 537.0
View: xlNormalView
Visible: true
VisibleRange: {System.__ComObject}
Width: 556.5
WindowNumber: 1
WindowState: xlMaximized
Zoom: 100.0
but unable to find out whether the cell is in edit mode or not?


"NickHK" wrote:

Show the code that is running in edit mode.

NickHK

"vj5" wrote in message
...
thanks for reply
but my code is working when the cell in edit mode
i wants to know how we can find that cell is in edit mode or normal

mode?

"NickHK" wrote:

As we have said many time, code does not run in edit mode.
I suppose you could look at the cell.

NickHK

"vj5" wrote in message
...
how to find out whether the active cell is in edit mode or not?









vj5

simple excel problem....
 
i am in edit mode , i clicked a commandbarbutton in edit mode and it runs
the code.
its working fine but my problem is to find out whether the cell is in edit
mode or not( as my code is working in both cases)?
is there any way?

"NickHK" wrote:

I don't use .Net/Interop but I do not see any Excel code running <<whilst in
Edit Mode.
If you are talking about multi-threading and your .Net code, that's nothing
to do with Excel
But your code automating Excel will mean the user cannot enter edit mode
until that code has finished.

If you can run any automation code, then you are not in edit mode.
I don't if DDE channels still respond in edit mode, but as using the .Net
Framework, there's no support for DDE AFAIK.

NickHK


"vj5" wrote in message
...
on a button click its runnning:
icrosoft.Office.Interop.Excel._Application appEXL =
(Microsoft.Office.Interop.Excel._Application)appli cationObject;
//.GetType().InvokeMember("Application", BindingFlags.GetProperty, null,
applicationObject, null);
Microsoft.Office.Interop.Excel._Worksheet wkSheet =

(Microsoft.Office.Interop.Excel._Worksheet)appEXL. ActiveWorkbook.ActiveSheet
;
..................
during debugging i am findnig l the values like:
?appEXL.ActiveWindow will return :

{System.__ComObject}
[System.__ComObject]: {System.__ComObject}
_DisplayRightToLeft: false
ActiveCell: {System.__ComObject}
ActiveChart: null
ActivePane: {System.__ComObject}
ActiveSheet: {System.__ComObject}
Application: {System.__ComObject}
Caption: "Book1"
Creator: xlCreatorCode
DisplayFormulas: false
DisplayGridlines: true
DisplayHeadings: true
DisplayHorizontalScrollBar: true
DisplayOutline: true
DisplayRightToLeft: false
DisplayVerticalScrollBar: true
DisplayWorkbookTabs: true
DisplayZeros: true
EnableResize: 'appEXL.ActiveWindow.EnableResize' threw an exception of
type 'System.Runtime.InteropServices.COMException'
FreezePanes: false
GridlineColor: 0
GridlineColorIndex: xlColorIndexAutomatic
Height: 177.75
Index: 1
Left: -2.75
OnWindow: 'appEXL.ActiveWindow.OnWindow' threw an exception of type
'System.Runtime.InteropServices.COMException'
Panes: {System.__ComObject}
Parent: {Microsoft.Office.Interop.Excel.WorkbookClass}
RangeSelection: {System.__ComObject}
ScrollColumn: 1
ScrollRow: 1
SelectedSheets: {System.__ComObject}
Selection: {System.__ComObject}
Split: false
SplitColumn: 0
SplitHorizontal: 0.0
SplitRow: 0
SplitVertical: 0.0
TabRatio: 0.6
Top: -22.25
Type: xlWorkbook
UsableHeight: 138.75
UsableWidth: 537.0
View: xlNormalView
Visible: true
VisibleRange: {System.__ComObject}
Width: 556.5
WindowNumber: 1
WindowState: xlMaximized
Zoom: 100.0
but unable to find out whether the cell is in edit mode or not?


"NickHK" wrote:

Show the code that is running in edit mode.

NickHK

"vj5" wrote in message
...
thanks for reply
but my code is working when the cell in edit mode
i wants to know how we can find that cell is in edit mode or normal

mode?

"NickHK" wrote:

As we have said many time, code does not run in edit mode.
I suppose you could look at the cell.

NickHK

"vj5" wrote in message
...
how to find out whether the active cell is in edit mode or not?










NickHK

simple excel problem....
 
According to
http://forums.microsoft.com/MSDN/Sho...58493&SiteID=1
one option, if on Excel XP or higher is to check Application.Ready.

Or
http://groups.google.co.uk/group/mic...7a5175d41417d3

NickHK

"vj5" wrote in message
...
i am in edit mode , i clicked a commandbarbutton in edit mode and it runs
the code.
its working fine but my problem is to find out whether the cell is in

edit
mode or not( as my code is working in both cases)?
is there any way?

"NickHK" wrote:

I don't use .Net/Interop but I do not see any Excel code running

<<whilst in
Edit Mode.
If you are talking about multi-threading and your .Net code, that's

nothing
to do with Excel
But your code automating Excel will mean the user cannot enter edit mode
until that code has finished.

If you can run any automation code, then you are not in edit mode.
I don't if DDE channels still respond in edit mode, but as using the

..Net
Framework, there's no support for DDE AFAIK.

NickHK


"vj5" wrote in message
...
on a button click its runnning:
icrosoft.Office.Interop.Excel._Application appEXL =
(Microsoft.Office.Interop.Excel._Application)appli cationObject;
//.GetType().InvokeMember("Application", BindingFlags.GetProperty,

null,
applicationObject, null);
Microsoft.Office.Interop.Excel._Worksheet wkSheet =


(Microsoft.Office.Interop.Excel._Worksheet)appEXL. ActiveWorkbook.ActiveSheet
;
..................
during debugging i am findnig l the values like:
?appEXL.ActiveWindow will return :

{System.__ComObject}
[System.__ComObject]: {System.__ComObject}
_DisplayRightToLeft: false
ActiveCell: {System.__ComObject}
ActiveChart: null
ActivePane: {System.__ComObject}
ActiveSheet: {System.__ComObject}
Application: {System.__ComObject}
Caption: "Book1"
Creator: xlCreatorCode
DisplayFormulas: false
DisplayGridlines: true
DisplayHeadings: true
DisplayHorizontalScrollBar: true
DisplayOutline: true
DisplayRightToLeft: false
DisplayVerticalScrollBar: true
DisplayWorkbookTabs: true
DisplayZeros: true
EnableResize: 'appEXL.ActiveWindow.EnableResize' threw an

exception of
type 'System.Runtime.InteropServices.COMException'
FreezePanes: false
GridlineColor: 0
GridlineColorIndex: xlColorIndexAutomatic
Height: 177.75
Index: 1
Left: -2.75
OnWindow: 'appEXL.ActiveWindow.OnWindow' threw an exception of

type
'System.Runtime.InteropServices.COMException'
Panes: {System.__ComObject}
Parent: {Microsoft.Office.Interop.Excel.WorkbookClass}
RangeSelection: {System.__ComObject}
ScrollColumn: 1
ScrollRow: 1
SelectedSheets: {System.__ComObject}
Selection: {System.__ComObject}
Split: false
SplitColumn: 0
SplitHorizontal: 0.0
SplitRow: 0
SplitVertical: 0.0
TabRatio: 0.6
Top: -22.25
Type: xlWorkbook
UsableHeight: 138.75
UsableWidth: 537.0
View: xlNormalView
Visible: true
VisibleRange: {System.__ComObject}
Width: 556.5
WindowNumber: 1
WindowState: xlMaximized
Zoom: 100.0
but unable to find out whether the cell is in edit mode or not?


"NickHK" wrote:

Show the code that is running in edit mode.

NickHK

"vj5" wrote in message
...
thanks for reply
but my code is working when the cell in edit mode
i wants to know how we can find that cell is in edit mode or

normal
mode?

"NickHK" wrote:

As we have said many time, code does not run in edit mode.
I suppose you could look at the cell.

NickHK

"vj5" wrote in message
...
how to find out whether the active cell is in edit mode or

not?












vj5

simple excel problem....
 
thanks again for helping!
application.ready always returns True in both cases
(cell in edit mode or not in edit mode)


"NickHK" wrote:

According to
http://forums.microsoft.com/MSDN/Sho...58493&SiteID=1
one option, if on Excel XP or higher is to check Application.Ready.

Or
http://groups.google.co.uk/group/mic...7a5175d41417d3

NickHK

"vj5" wrote in message
...
i am in edit mode , i clicked a commandbarbutton in edit mode and it runs
the code.
its working fine but my problem is to find out whether the cell is in

edit
mode or not( as my code is working in both cases)?
is there any way?

"NickHK" wrote:

I don't use .Net/Interop but I do not see any Excel code running

<<whilst in
Edit Mode.
If you are talking about multi-threading and your .Net code, that's

nothing
to do with Excel
But your code automating Excel will mean the user cannot enter edit mode
until that code has finished.

If you can run any automation code, then you are not in edit mode.
I don't if DDE channels still respond in edit mode, but as using the

..Net
Framework, there's no support for DDE AFAIK.

NickHK


"vj5" wrote in message
...
on a button click its runnning:
icrosoft.Office.Interop.Excel._Application appEXL =
(Microsoft.Office.Interop.Excel._Application)appli cationObject;
//.GetType().InvokeMember("Application", BindingFlags.GetProperty,

null,
applicationObject, null);
Microsoft.Office.Interop.Excel._Worksheet wkSheet =


(Microsoft.Office.Interop.Excel._Worksheet)appEXL. ActiveWorkbook.ActiveSheet
;
..................
during debugging i am findnig l the values like:
?appEXL.ActiveWindow will return :

{System.__ComObject}
[System.__ComObject]: {System.__ComObject}
_DisplayRightToLeft: false
ActiveCell: {System.__ComObject}
ActiveChart: null
ActivePane: {System.__ComObject}
ActiveSheet: {System.__ComObject}
Application: {System.__ComObject}
Caption: "Book1"
Creator: xlCreatorCode
DisplayFormulas: false
DisplayGridlines: true
DisplayHeadings: true
DisplayHorizontalScrollBar: true
DisplayOutline: true
DisplayRightToLeft: false
DisplayVerticalScrollBar: true
DisplayWorkbookTabs: true
DisplayZeros: true
EnableResize: 'appEXL.ActiveWindow.EnableResize' threw an

exception of
type 'System.Runtime.InteropServices.COMException'
FreezePanes: false
GridlineColor: 0
GridlineColorIndex: xlColorIndexAutomatic
Height: 177.75
Index: 1
Left: -2.75
OnWindow: 'appEXL.ActiveWindow.OnWindow' threw an exception of

type
'System.Runtime.InteropServices.COMException'
Panes: {System.__ComObject}
Parent: {Microsoft.Office.Interop.Excel.WorkbookClass}
RangeSelection: {System.__ComObject}
ScrollColumn: 1
ScrollRow: 1
SelectedSheets: {System.__ComObject}
Selection: {System.__ComObject}
Split: false
SplitColumn: 0
SplitHorizontal: 0.0
SplitRow: 0
SplitVertical: 0.0
TabRatio: 0.6
Top: -22.25
Type: xlWorkbook
UsableHeight: 138.75
UsableWidth: 537.0
View: xlNormalView
Visible: true
VisibleRange: {System.__ComObject}
Width: 556.5
WindowNumber: 1
WindowState: xlMaximized
Zoom: 100.0
but unable to find out whether the cell is in edit mode or not?


"NickHK" wrote:

Show the code that is running in edit mode.

NickHK

"vj5" wrote in message
...
thanks for reply
but my code is working when the cell in edit mode
i wants to know how we can find that cell is in edit mode or

normal
mode?

"NickHK" wrote:

As we have said many time, code does not run in edit mode.
I suppose you could look at the cell.

NickHK

"vj5" wrote in message
...
how to find out whether the active cell is in edit mode or

not?













NickHK[_3_]

simple excel problem....
 
I was surprised that it even exists.
Logically, if the application is not ready, how can answer that question ???

What about the other method ?

NickHK

"vj5" ...
thanks again for helping!
application.ready always returns True in both cases
(cell in edit mode or not in edit mode)


"NickHK" wrote:

According to
http://forums.microsoft.com/MSDN/Sho...58493&SiteID=1
one option, if on Excel XP or higher is to check Application.Ready.

Or
http://groups.google.co.uk/group/mic...7a5175d41417d3

NickHK

"vj5" wrote in message
...
i am in edit mode , i clicked a commandbarbutton in edit mode and it
runs
the code.
its working fine but my problem is to find out whether the cell is in

edit
mode or not( as my code is working in both cases)?
is there any way?

"NickHK" wrote:

I don't use .Net/Interop but I do not see any Excel code running

<<whilst in
Edit Mode.
If you are talking about multi-threading and your .Net code, that's

nothing
to do with Excel
But your code automating Excel will mean the user cannot enter edit
mode
until that code has finished.

If you can run any automation code, then you are not in edit mode.
I don't if DDE channels still respond in edit mode, but as using the

..Net
Framework, there's no support for DDE AFAIK.

NickHK


"vj5" wrote in message
...
on a button click its runnning:
icrosoft.Office.Interop.Excel._Application appEXL =
(Microsoft.Office.Interop.Excel._Application)appli cationObject;
//.GetType().InvokeMember("Application", BindingFlags.GetProperty,

null,
applicationObject, null);
Microsoft.Office.Interop.Excel._Worksheet wkSheet =


(Microsoft.Office.Interop.Excel._Worksheet)appEXL. ActiveWorkbook.ActiveSheet
;
..................
during debugging i am findnig l the values like:
?appEXL.ActiveWindow will return :

{System.__ComObject}
[System.__ComObject]: {System.__ComObject}
_DisplayRightToLeft: false
ActiveCell: {System.__ComObject}
ActiveChart: null
ActivePane: {System.__ComObject}
ActiveSheet: {System.__ComObject}
Application: {System.__ComObject}
Caption: "Book1"
Creator: xlCreatorCode
DisplayFormulas: false
DisplayGridlines: true
DisplayHeadings: true
DisplayHorizontalScrollBar: true
DisplayOutline: true
DisplayRightToLeft: false
DisplayVerticalScrollBar: true
DisplayWorkbookTabs: true
DisplayZeros: true
EnableResize: 'appEXL.ActiveWindow.EnableResize' threw an

exception of
type 'System.Runtime.InteropServices.COMException'
FreezePanes: false
GridlineColor: 0
GridlineColorIndex: xlColorIndexAutomatic
Height: 177.75
Index: 1
Left: -2.75
OnWindow: 'appEXL.ActiveWindow.OnWindow' threw an exception of

type
'System.Runtime.InteropServices.COMException'
Panes: {System.__ComObject}
Parent: {Microsoft.Office.Interop.Excel.WorkbookClass}
RangeSelection: {System.__ComObject}
ScrollColumn: 1
ScrollRow: 1
SelectedSheets: {System.__ComObject}
Selection: {System.__ComObject}
Split: false
SplitColumn: 0
SplitHorizontal: 0.0
SplitRow: 0
SplitVertical: 0.0
TabRatio: 0.6
Top: -22.25
Type: xlWorkbook
UsableHeight: 138.75
UsableWidth: 537.0
View: xlNormalView
Visible: true
VisibleRange: {System.__ComObject}
Width: 556.5
WindowNumber: 1
WindowState: xlMaximized
Zoom: 100.0
but unable to find out whether the cell is in edit mode or not?


"NickHK" wrote:

Show the code that is running in edit mode.

NickHK

"vj5" wrote in message
...
thanks for reply
but my code is working when the cell in edit mode
i wants to know how we can find that cell is in edit mode or

normal
mode?

"NickHK" wrote:

As we have said many time, code does not run in edit mode.
I suppose you could look at the cell.

NickHK

"vj5" wrote in message
...
how to find out whether the active cell is in edit mode or

not?
















All times are GMT +1. The time now is 10:20 AM.

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