I am having problems coding some of my buttons. This is what I\'ve got so far:
Public Class Form1
Dim Button(12) As Button
Dim X As Integer
Private Sub EventNa
It sounds like you just want a person to click on a button and change the text of that button?
If that is correct, something like this would work in your click method:
With DirectCast(sender, Button)
.Text = InputBox("Button Name", "Button Name", .Text)
End With
If every button needs that same input, then try something like this:
Dim value As String = InputBox("Button Name", "Button Name")
For Each btn As Button In Buttons
If btn IsNot Nothing Then
btn.Text = value
End If
Next
You should strongly consider moving away from using that Buttons array. If you need to hold a reference of those buttons in a list, use a List(of Button)
instead.