I'm sorry I couldn't get HTMLMAKER to work. I hope it is ok to post my code like this.
I'm using Excel 2010. This is a short and sweet version of my program. Is there a way to compile the variable in blue below without having to write code for each variable i.e. machine101, machine102, etc.?
machineNumb has to be a string, because I move it to a cell later on and Speak it with Application.Speech.Speak
Public machineNumb As String
Public machine101 As Boolean
Public machine102 As Boolean
Public machine103 As Boolean
Public thisVariable As Variant
Sub MySub
machineNumb = 100
Do
machineNumb = machineNumb +1
If thisVariable = 1 Then
machine(machineNumb) = true 'I want this to set value of machine102, machine103, etc
End If
Loop Until machineNumb = 103
End Sub
I'm using Excel 2010. This is a short and sweet version of my program. Is there a way to compile the variable in blue below without having to write code for each variable i.e. machine101, machine102, etc.?
machineNumb has to be a string, because I move it to a cell later on and Speak it with Application.Speech.Speak
Public machineNumb As String
Public machine101 As Boolean
Public machine102 As Boolean
Public machine103 As Boolean
Public thisVariable As Variant
Sub MySub
machineNumb = 100
Do
machineNumb = machineNumb +1
If thisVariable = 1 Then
machine(machineNumb) = true 'I want this to set value of machine102, machine103, etc
End If
Loop Until machineNumb = 103
End Sub