markburke10
Programmer
I am new with VBA. I get the error Invalid use of New Keyword on statement "set si = New StarTeam.StServerInfo"
If I remove the set statement, then I get the error Object variable or With block variable not set, on the statement "si.setPort (12345)"
The latter removal indicates to me that the si object must be created with a set ... new object statement. However when I do that, I get the invalid use of New Keyword.
Here is my procedure
Sub Macro1()
Dim strAddress As String
Dim nPort As Integer
Dim strUserName As String
Dim strPassword As String
Dim x As Integer
Dim p As StarTeam.StProject
Dim v As StarTeam.StView
Dim f As StarTeam.StFolder
Dim si As StarTeam.StServerInfo
Dim s As StarTeam.StServer
x = 0
Set si = New StarTeam.StServerInfo '<<New error
si.setPort (12345) '<<if no new stmt, object with error
si.setUserName ("name")
si.Password = "xxxxx"
si.Address = "server.com"
s.Connect
End Sub
I am using a com object dll called "StarTeam Library", referring to c:\program files (x86)\Borland\StarTeam SDK 10.4\lib\StarTeamSDK104.dll
Its interface is documented at
Help is appreciated, thank you very very much.
If I remove the set statement, then I get the error Object variable or With block variable not set, on the statement "si.setPort (12345)"
The latter removal indicates to me that the si object must be created with a set ... new object statement. However when I do that, I get the invalid use of New Keyword.
Here is my procedure
Sub Macro1()
Dim strAddress As String
Dim nPort As Integer
Dim strUserName As String
Dim strPassword As String
Dim x As Integer
Dim p As StarTeam.StProject
Dim v As StarTeam.StView
Dim f As StarTeam.StFolder
Dim si As StarTeam.StServerInfo
Dim s As StarTeam.StServer
x = 0
Set si = New StarTeam.StServerInfo '<<New error
si.setPort (12345) '<<if no new stmt, object with error
si.setUserName ("name")
si.Password = "xxxxx"
si.Address = "server.com"
s.Connect
End Sub
I am using a com object dll called "StarTeam Library", referring to c:\program files (x86)\Borland\StarTeam SDK 10.4\lib\StarTeamSDK104.dll
Its interface is documented at
Help is appreciated, thank you very very much.