Reputation: 31
I'd like to use Visual Basic in my software. And I wonder if it is copyright protected? Any clues would be highly appreciated.
Thank you.
Upvotes: 1
Views: 847
Reputation: 5338
Microsoft used to offer the VBA SDK for download from MSDN (under filename en_visual_basic_for_applications_6.0_sdk_version_6.5_x86_cd_x14-97169.iso
), although it appears to have since been removed (apparently you can still legally download it if you have an MSDN subscription, plus it is possible to find unauthorised copies of it on various websites). To legally distribute an app built with the SDK, you had to buy a distribution license from Microsoft's reseller – http://summsoft.com/vba/ – but in 2007 Microsoft decided to stop selling licenses to new customers. So unless you'd already licensed it from them pre-2007, they can't legally sell the license to you, and you can't legally redistribute any code you build with the VBA SDK.
Upvotes: 1
Reputation: 162
VBScript is easily embedded. VBA requires a license.
This is VB6/VBA code adding VBScript as a macro language.
With ScriptControl1
.Language = "VBScript"
.UseSafeSubset = False
.AllowUI = True
' MsgBox "Hwnd " & .SitehWnd() & " Safe " & .UseSafeSubset() & " Timeout " & .Timeout & " State " & .State
' MsgBox .Eval("6+5")
.AddObject "frmSDI", frmSDI, True
End With
Private Sub CmdRun_Click()
On Error Resume Next
Dim A As String
Dim B
A = Text1.Text()
frmSDI.ScriptControl1.AddCode A
If Err.Number <> 0 Then ReportError "frmMacro-CmdRun", "Unable to add code."
End Sub
These are the VBA rules you must implement.
https://msdn.microsoft.com/en-us/library/ee177324.aspx
Upvotes: 1