Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I' am starting from an open excel work- book a code. This cod
contents: Step 1: I would add a new workbook Step 2: I would insert a commandbutton on sheet(1) that listen to code (e.g. a msgBox) Step 3: I want to include a event workbook_beforeSaved (e.g. a msgBox) Is it possible to write one code in the open workbook that do thos things I have made step 1 succesfully: Function CreateNewWorkbook(Optional intNumberSheets As Integer = 1 As Workbook Dim wkbNew As Excel.Workbook On Error GoTo CreateNewWorkbook_Err Set wkbNew = Workbooks.Add Set CreateNewWorkbook = wkbNew Application.SheetsInNewWorkbook = intNumberSheets CreateNewWorkbook_End: Exit Function CreateNewWorkbook_Err: Set CreateNewWorkbook = Nothing wkbNew.Close savechanges:=False Set wkbNew = Nothing Resume CreateNewWorkbook_End End Functio -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how can I keep a tab in place? | Excel Discussion (Misc queries) | |||
user form-on open event? keydown event? | Excel Programming | |||
Event Procedures: Event on Worksheet to fire Event on another Worksheet | Excel Programming | |||
change event/after update event?? | Excel Programming | |||
OnTime event not firing in Workbook_Open event procedure | Excel Programming |