hi guys this is probley simple and i have an external board controlling various things on the board is a button which i would like when pressed activates code within a button on my vb form i have tried button1.select but that only well selects the button on my form rather than activate the code

this code is in a timer which scans all 5 pushbuttons on my hardware
[ If ReadDigitalChannel(2) = True Then

End If ]

this is the code that the button on my form runs
[ If table1 = False Then
Button1.Text = "Off"
table1 = True
d1 = TimeOfDay
Me.AxForgeLEDc1.Visible = True
Me.AxForgeLEDc1.LEDstate = 1
stats.Label1.Text = TimeOfDay
stats.Button2.Enabled = True


d2 = TimeOfDay
x = d2 - d1
stats.Label2.Text = x.ToString
stats.Label3.Text = Format(elp, "c")
stats.Button2.Enabled = True
stats.Text = "Stats For Table 1 "

End If ]

i think i have explaned things and added the code correctly

thank you all

You just type the button's event code in Timer_Tick() event.
When u click on button.
Just type

thanx maya had tried that before and it did work ok perhaps i was just trying to keep codeing to a minimum , so will just go with my initial idead and what you say

thanx again for your prompt reply


You should use the Button.Performclick() event for that instead of select.

thats the one i was looking for thank you so much luc001 ur a star


No problem, thank me with the arrow key :)

commented: great person thanx again +3