lundi 11 mai 2015

VB call subroutine on button click

I have following subroutine written in vb:

Public Sub Command1_Click()
    Dim idm1 As CIDMLinkTransmitter
    Dim referer As String
    Dim cookie As String
    Dim postData As String
    Dim user As String
    Dim password As String
    idm1 = CreateObject("IDMan.CIDMLinkTransmitter")
    idm1.SendLinkToIDM("http://ift.tt/1QBOXGI",
    referrer, cookie, postData, user, password, "C:\", "idman401.exe", 0)
End Sub

I am trying to call this subroutine on a button click. I use Call statement but it gave me syntax error.

Call Command1_Click() //Syntax Error

I just want to test if subroutine works. How can I do that?

Aucun commentaire:

Enregistrer un commentaire