Microsoft Office Tutorials and References
In Depth Information
Option Explicit
Public ExcelApp As Excel.Application
Private Sub AddinInstance_OnAddInsUpdate(custom() As Variant)
‘Called when an add-in is changed
End Sub
Private Sub AddinInstance_OnBeginShutdown(custom() As Variant)
‘Called when Excel is in the process of shutting down
End Sub
Private Sub AddinInstance_OnConnection(ByVal Application As Object, _
ByVal ConnectMode As AddInDesignerObjects.ext_ConnectMode, _
ByVal AddInInst As Object, custom() As Variant)
Set ExcelApp = Application
End Sub
Private Sub AddinInstance_OnDisconnection( _
ByVal RemoveMode As AddInDesignerObjects.ext_DisconnectMode, _
custom() As Variant)
Set ExcelApp = Nothing
End Sub
Private Sub AddinInstance_OnStartupComplete(custom() As Variant)
‘Called when Excel is ready to use
End Sub
Public Function DiscountedPrice(ListPrice, Discount) As Currency
If Discount <= 1 And Discount >= 0 Then
DiscountedPrice = ListPrice * (1 - Discount)
Else
DiscountedPrice = 0
End If
End Function
Search JabSto ::




Custom Search