Thank you both of you. I got it with:
Public Sub Form_Load() Handles MyBase.Load
User Profile
Collapse
-
I need it to be disabled or enabled based off what is in that file, so depending if that file says on or off, I need the button to be enabled or disabled.
The problem is I can't figure out how to run the IF THEN comparison without clicking a button first.Leave a comment:
-
Let me explain in a little more detail, assuming the following is the button I want to return false / true off a variable:
...Code:Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim fileReader As String fileReader = My.Computer.FileSystem.ReadAllText("C:\testing.txt") MsgBox(fileReader) If fileReader = "BRONZE"Leave a comment:
-
Disabling a Button based off a Variable in a form
Here's the code I am using:
...Code:Public Class Form1 Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
No activity results to display
Show More
Leave a comment: