However, using a little VBA, we can add our own items to the list.
We do this using SanScript!
Here is an example of how to accomplish this:
Private
Sub Window_BeforeOpen(OpenVisible As Boolean)
Dim
CompilerApp As Object
Dim CompilerMessage As String
Dim CompilerError As Integer
Dim CompilerCommand As String
' Create link without having reference marked
Set CompilerApp = CreateObject("Dynamics.Application")
CompilerCommand = ""
CompilerCommand = CompilerCommand & "add item str(2099) to
'Year' of window MyWindow of form MyForm;"
' Execute SanScript
CompilerApp.CurrentProductID = 131
CompilerApp.CurrentProduct = CompilerApp.CurrentProduct &
"!Modified"
CompilerError = CompilerApp.ExecuteSanscript(CompilerCommand,
CompilerMessage)
If CompilerError <> 0 Then
MsgBox CompilerMessage
End If
End
Sub
No comments:
Post a Comment