greglittle
10-18-2012, 02:41 PM
Please help me figure out how to make the StatusBar property work for registering my UDFs. The descriptions are working correctly and they are appearing in the correct categories, but for some reason the StatusBar text is not appearing. (Is there a character limit?) Thanks!
Here is my sub to register them contained in the same module as my UDFs:
Sub RegisterUDFs()
Dim cF As String
Dim C As String
Dim PV As String
Dim G As String
cF = "Calculates the Country Risk Premium based on the Country Risk Curve." & vbLf _
& "CurveFormula(<Country Risk Multiplier>)"
C = "Calculates the CAGR of a range of values." & vbLf _
& "CAGR(range)"
PV = "Calculates the total of the Present Values of a range of cash flows." & vbLf _
& "PVsum(range,[periods/yr])"
G = "Calculates Avg. Growth of a range of values following break-even." & vbLf _
& "AvgGrowth(range)"
Application.MacroOptions Macro:="CurveFormula", Description:=cF, Category:=5, StatusBar:="CurveFormula(range) / Calculates the Country Risk Premium based on the Country Risk Curve."
Application.MacroOptions Macro:="CAGR", Description:=C, Category:=1, StatusBar:="CAGR(range)"
Application.MacroOptions Macro:="PVsum", Description:=PV, Category:=1, StatusBar:="PVsum(range,[integer (periods/yr)]) / Calculates the total of the Present Values of a range of cash flows."
Application.MacroOptions Macro:="AvgGrowth", Description:=G, Category:=1, StatusBar:="AvgGrowth(range) / Calculates Avg. Growth of a range of values following break-even."
End Sub
Here is what I have placed in my 'ThisWorkbook' object:
Private Sub Workbook_Open()
RegisterUDFs
End Sub
P.S. Am I correct in assuming that every time the workbook is re-opened the UDFs need to be registered again? (I also assume that I should unregister them on Workbook_Close, correct?)
Here is my sub to register them contained in the same module as my UDFs:
Sub RegisterUDFs()
Dim cF As String
Dim C As String
Dim PV As String
Dim G As String
cF = "Calculates the Country Risk Premium based on the Country Risk Curve." & vbLf _
& "CurveFormula(<Country Risk Multiplier>)"
C = "Calculates the CAGR of a range of values." & vbLf _
& "CAGR(range)"
PV = "Calculates the total of the Present Values of a range of cash flows." & vbLf _
& "PVsum(range,[periods/yr])"
G = "Calculates Avg. Growth of a range of values following break-even." & vbLf _
& "AvgGrowth(range)"
Application.MacroOptions Macro:="CurveFormula", Description:=cF, Category:=5, StatusBar:="CurveFormula(range) / Calculates the Country Risk Premium based on the Country Risk Curve."
Application.MacroOptions Macro:="CAGR", Description:=C, Category:=1, StatusBar:="CAGR(range)"
Application.MacroOptions Macro:="PVsum", Description:=PV, Category:=1, StatusBar:="PVsum(range,[integer (periods/yr)]) / Calculates the total of the Present Values of a range of cash flows."
Application.MacroOptions Macro:="AvgGrowth", Description:=G, Category:=1, StatusBar:="AvgGrowth(range) / Calculates Avg. Growth of a range of values following break-even."
End Sub
Here is what I have placed in my 'ThisWorkbook' object:
Private Sub Workbook_Open()
RegisterUDFs
End Sub
P.S. Am I correct in assuming that every time the workbook is re-opened the UDFs need to be registered again? (I also assume that I should unregister them on Workbook_Close, correct?)