07-05-2013, 06:38 PM
Copied from VbExec help:
Macro Macro2064
Copied from VbFunc help:
Macro Macro2064
Example using CsScript class:
Macro Macro2064
_______________
Yes, must be 2.3.5.9. Thank you.
Macro Macro2064
VbExec ""
#ret
Imports System
Imports System.Windows.Forms
Module Module1
Sub Main()
;Console.WriteLine("VB")
;MessageBox.Show("VB")
End Sub
End ModuleCopied from VbFunc help:
Macro Macro2064
;example with code in string and using Module
str code=
;Imports System
;Public Module Test
;Function Add(a as Integer, b as Integer) As Integer
;;Return a+b
;End Function
;End Module
out VbFunc(code 5 2)
;example with code in same macro and using Class
out VbFunc("" 5 2)
#ret
Imports System
Public Class Test
Public Shared Function Add(a as Integer, b as Integer) As Integer
;Return a+b
End Function
End ClassExample using CsScript class:
Macro Macro2064
CsScript x.SetOptions("language=VB")
x.AddCode(code)
;then use x.Call or x.CreateObject like with C#Yes, must be 2.3.5.9. Thank you.
