Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
.Net Automation Add-In - Execution Always Ends in Edit Mode
I have written a C# Automation Add-In for Excel. Everything is working as
desired with one exception. I have a doubleclick handler that brings up a form to edit the formula in that cell. However, when the form is closed (either because the user made a change and clicked OK, or clicked Cancel) Excel always enters edit-mode on that cell. I have to programatically then select the neighboring cell and then reselect the current cell so that it appears to the user to not have entered edit mode. It was my understanding that the "ref bool bCancel" param on the doubleclick handler was to address this issue but whether I set bCancel to true or false, I cannot avoid this problem. Help? thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
.Net Automation Add-In - Execution Always Ends in Edit Mode
Matthew,
Using VB6, this works as expected; user is not in Edit Mode. Dim WithEvents XLApp As Excel.Application Private Sub Form_Load() Set XLApp = New Excel.Application XLApp.Visible = True XLApp.Workbooks.Add End Sub Private Sub XLApp_SheetBeforeDoubleClick(ByVal Sh As Object, ByVal Target As Excel.Range, Cancel As Boolean) 'MsgBox "From XLApp_SheetBeforeDoubleClick event: " & Sh.Name & Target.Address Cancel = True End Sub Private Sub Form_Terminate() XLApp.Quit Set XLApp = Nothing End Sub NickHK "Matthew Wieder" wrote in message ... I have written a C# Automation Add-In for Excel. Everything is working as desired with one exception. I have a doubleclick handler that brings up a form to edit the formula in that cell. However, when the form is closed (either because the user made a change and clicked OK, or clicked Cancel) Excel always enters edit-mode on that cell. I have to programatically then select the neighboring cell and then reselect the current cell so that it appears to the user to not have entered edit mode. It was my understanding that the "ref bool bCancel" param on the doubleclick handler was to address this issue but whether I set bCancel to true or false, I cannot avoid this problem. Help? thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Combo Box goes to edit mode even if design mode is in OFF position | Excel Discussion (Misc queries) | |||
Edit Mode | Excel Programming | |||
Edit Mode | Excel Programming | |||
Edit points, how to show that view at the end of a macro execution | Excel Programming | |||
MsgBox execution sends program into design mode | Excel Programming |