kevin lazell
Well-known Member
- Joined
- Jun 2, 2004
- Messages
- 513
Sub Sheet2_Button185_Click()
Dim A As String
Dim txt As String
Dim hf As Variant
Dim g As Variant
Dim q As Variant
If Range("s12") = 2 Then GoTo one:
*** the above line does not execute ***
g = Range("C" & Rows.Count).End(xlUp): If g = 0 Then Range("z" & Rows.Count).End(xlUp).Offset(1, 0).Value = Range("g1").Value: Range("g1") = Range("a1"): Range("a1") = Range("z1")
q = Range("e" & Rows.Count).End(xlUp): If q = 0 Then Range("z" & Rows.Count).End(xlUp).Offset(1, 0).Value = Range("a1").Value: Range("a1") = Range("z1")
Range("z1") = Range("z2"): Range("z2") = Range("z3"): Range("z3") = Range("z4"): Range("z4") = Range("z5")
If Sheets("sheet1").Range("e17") = 6 Then Range("z5").ClearContents
If Sheets("sheet1").Range("e17") = 5 Then Range("z4").ClearContents
If Sheets("sheet1").Range("e17") = 4 Then Range("z3").ClearContents
If Sheets("sheet1").Range("e17") = 3 Then Range("z2").ClearContents
GoTo two:
one:
q = Range("e" & Rows.Count).End(xlUp): If q = 0 Then GoTo two:
A = Range("G1"): Range("G1") = Range("A1"): Range("A1") = A
two:
Range("A2:G30").ClearContents
Range("H11") = 1: Range("i11") = 1
Range("B1").Select
txt = Range("A1")
Application.Wait Now + TimeSerial(0, 0, 2)
Application.Speech.Speak " it IS "
Application.Speech.Speak txt
Application.Speech.Speak " TO THROW FIRST GAME ON"
end sub
hi all
i have the above code which works ok except for the highlighted line, the code does not
want to know it. if i check the code using the step into, ie pressing f8 it works fine
can someone please point me in the right direction to solve this problem
cheers
kev
Dim A As String
Dim txt As String
Dim hf As Variant
Dim g As Variant
Dim q As Variant
If Range("s12") = 2 Then GoTo one:
*** the above line does not execute ***
g = Range("C" & Rows.Count).End(xlUp): If g = 0 Then Range("z" & Rows.Count).End(xlUp).Offset(1, 0).Value = Range("g1").Value: Range("g1") = Range("a1"): Range("a1") = Range("z1")
q = Range("e" & Rows.Count).End(xlUp): If q = 0 Then Range("z" & Rows.Count).End(xlUp).Offset(1, 0).Value = Range("a1").Value: Range("a1") = Range("z1")
Range("z1") = Range("z2"): Range("z2") = Range("z3"): Range("z3") = Range("z4"): Range("z4") = Range("z5")
If Sheets("sheet1").Range("e17") = 6 Then Range("z5").ClearContents
If Sheets("sheet1").Range("e17") = 5 Then Range("z4").ClearContents
If Sheets("sheet1").Range("e17") = 4 Then Range("z3").ClearContents
If Sheets("sheet1").Range("e17") = 3 Then Range("z2").ClearContents
GoTo two:
one:
q = Range("e" & Rows.Count).End(xlUp): If q = 0 Then GoTo two:
A = Range("G1"): Range("G1") = Range("A1"): Range("A1") = A
two:
Range("A2:G30").ClearContents
Range("H11") = 1: Range("i11") = 1
Range("B1").Select
txt = Range("A1")
Application.Wait Now + TimeSerial(0, 0, 2)
Application.Speech.Speak " it IS "
Application.Speech.Speak txt
Application.Speech.Speak " TO THROW FIRST GAME ON"
end sub
hi all
i have the above code which works ok except for the highlighted line, the code does not
want to know it. if i check the code using the step into, ie pressing f8 it works fine
can someone please point me in the right direction to solve this problem
cheers
kev