View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Jim Tilson Jim Tilson is offline
external usenet poster
 
Posts: 3
Default VSTO and Excel--End Cell Edit Mode?

It did not work. The cell is still in edit mode.

Your event handler code below is for the Workbook BeforeSave event. I'm
talking about my own event handler to save the spreadsheet data to the
database--I'm not running through the WorkBook's file save event.
--
Jim Tilson
MCP


""Peter Huang" [MSFT]" wrote:

Hi

In Edit Mode, the Excel messge will enter a loop(similar as a modal
dialog,msgbox), so most of menu and button will be grey out.
Based on my test, it will work in the Save Button.
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
MsgBox Application.ActiveCell.AddressLocal
Debug.Print "Save"
Cells(1, 1).Select
End Sub

I think you may try to do the similar job in your own button click.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.