yahas.blogg.se

Excel vba on open sheet event
Excel vba on open sheet event









We will need this laterģ) If the “protected” worksheet was deleted, recognize that in the WorksheetActivate Event and copy back the backed up worksheet to this workbook. So instead I copy the worksheet to a temporary workbook.Ģ) Store all of the named ranges into a global array. I found that copying the worksheet to another worksheet in the workbook ultimately created issues with Range Name. In order to restore the worksheet, some preliminary steps need to be taken.ġ)ěack up the worksheet in the WorksheetDeactivate Event. The problem was what to do if the user was not allowed to delete that particular worksheet. '** The worksheet was deleted - do something Private Sub Workbook_SheetActivate(ByVal ws As Object) '** iWksCountBefore was declared as a global variable RE: Excel VBA Before Delete Worksheet Event SkipVought (Programmer) 27 Jan 15 05:03ĬODE Private Sub Workbook_SheetDeactivate(ByVal ws As Object) But in earlier versions, it appears I need to create a workaround. With that event, I could easily prevent the Core worksheets from being deleted. It appears that in Excel 2013, there is a deleteworksheet event. I need to make sure that the user can delete these additional worksheets but cannot delete the Core worksheets. So in summary, a user can create a workbook with a minimum of 2 worksheets or the workbook could be comprised of multiple Goal worksheets. The user is allowed to rename the sheets, except for he Administrative sheet.Īll of these worksheets need to be visible. He also might want to delete these additional worksheets.

excel vba on open sheet event

The user might also want to create his own worksheet within this workbook that provides some supporting data. The Goal worksheet can be copied by the user (there is a button on the goal worksheet) that brings over the Goal worksheet form and its data, making it easier for the user to set the goals for another employee.

#Excel vba on open sheet event code#

(There is a lot of vba code behind these sheets). The simplest workbook is comprised of an Administrative worksheet and a second worksheet that sets the goals for an individual.

excel vba on open sheet event

It sets out goals and then measures performance against the goals. My client has asked me to build a standardized goal setting system for marketing and sales personnel.

excel vba on open sheet event

Let me provide a more comprehensive explanation of my application.









Excel vba on open sheet event