I am trying to create an Workbook Level Event using the Workbook_NewSheet event.
I am trying some very simple stuff to begin with.
Sheet 1 has 3 Names associated with it.
They are Duty, HST, and Profit.
It has headers in Row 1, like Column 1 is Description
I am trying to duplicate this information associated with sheet 1 every time I create a new sheet, plus add a new Name called Freight, with a value of $0.36.
The code below is the very, very basic start.
I don't even believe the code is running, because when I click on Newsheet (low left icon on the actual workbook), it creates a new worksheet but when I look under the Names manager the new Name Freight does not exist, plus there is no value of "Description" in Cell A1.
How do I get this to even initiated?
thanks
I am trying some very simple stuff to begin with.
Sheet 1 has 3 Names associated with it.
They are Duty, HST, and Profit.
It has headers in Row 1, like Column 1 is Description
I am trying to duplicate this information associated with sheet 1 every time I create a new sheet, plus add a new Name called Freight, with a value of $0.36.
The code below is the very, very basic start.
I don't even believe the code is running, because when I click on Newsheet (low left icon on the actual workbook), it creates a new worksheet but when I look under the Names manager the new Name Freight does not exist, plus there is no value of "Description" in Cell A1.
How do I get this to even initiated?
Code:
Private Sub Workbook_NewSheet(ByVal Sh As Object)
Names.Add Name:="Duty", RefersTo:=0.05
Names.Add Name:="HST", RefersTo:=0.13
Names.Add Name:="Profit", RefersTo:=0.12
Names.Add Name:="Freight", RefersTo:=0.36
Cells(1, 1).Value = "Description"
End Sub