No not all variables are dimensioned and Option Explicit
is not in the module. I didn't write the code, it was
written by someone else who no longer works here. What's
strange is that the same code works great on an NT machine
but not on XP.
For instance, in the following code the 'PIC' variable is
not dimensioned, however, it must be in order for the code
to function on an XP workstation but on the NT machine it
works fine. I am finding this situation all throughout
the code.
Private Sub Apply_Click()
If IsNumeric(RPM.Value) And IsNumeric(D.Value) And
IsNumeric(R.Value) And IsNumeric(L.Value) And IsNumeric
(A.Value) Then
If RPM.Value > 0 And D.Value > 0 And R.Value > 0
And L.Value > 0 And A.Value >= 0 Then
Tread.RPM = RPM.Value: Tread.Ra = D.Value:
Tread.Rf = R.Value: Tread.Rr = L.Value: Tread.FDC = A.Value
If I11cw.Visible = True Then Tread.ROT =
1: Tread.CONFIG = -1: PIC = "C:\1ICW.bmp"
If I11ccw.Visible = True Then Tread.ROT = -
1: Tread.CONFIG = -1: PIC = "C:\1ICCW.bmp"
If I14cw.Visible = True Then Tread.ROT =
1: Tread.CONFIG = 1: PIC = "C:\1IVCW.bmp"
If I14ccw.Visible = True Then Tread.ROT = -
1: Tread.CONFIG = 1: PIC = "C:\1IVCCW.bmp"
If I21cw.Visible = True Then Tread.ROT =
1: Tread.CONFIG = 1: PIC = "C:\2ICW.bmp"
If I21ccw.Visible = True Then Tread.ROT = -
1: Tread.CONFIG = 1: PIC = "C:\2ICCW.bmp"
If I22cw.Visible = True Then Tread.ROT =
1: Tread.CONFIG = -1: PIC = "C:\2IICW.bmp"
If I22ccw.Visible = True Then Tread.ROT = -
1: Tread.CONFIG = -1: PIC = "C:\2IICCW.bmp"
If I33cw.Visible = True Then Tread.ROT =
1: Tread.CONFIG = 1: PIC = "C:\3IIICW.bmp"
If I33ccw.Visible = True Then Tread.ROT = -
1: Tread.CONFIG = 1: PIC = "C:\3IIICCW.bmp"
If I34cw.Visible = True Then Tread.ROT =
1: Tread.CONFIG = -1: PIC = "C:\3IVCW.bmp"
If I34ccw.Visible = True Then Tread.ROT = -
1: Tread.CONFIG = -1: PIC = "C:\3IVCCW.bmp"
If I42cw.Visible = True Then Tread.ROT =
1: Tread.CONFIG = 1: PIC = "C:\4IICW.bmp"
If I42ccw.Visible = True Then Tread.ROT = -
1: Tread.CONFIG = 1: PIC = "C:\4IICCW.bmp"
If I43cw.Visible = True Then Tread.ROT =
1: Tread.CONFIG = -1: PIC = "C:\4IIICW.bmp"
If I43ccw.Visible = True Then Tread.ROT = -
1: Tread.CONFIG = -1: PIC = "C:\4IIICCW.bmp"
Worksheets("Export Sheet").Cells(11, 2).Value
= PP.Value + "-" + RP.Value + "-" + CR.Value
Worksheets("Export Sheet").Cells(11, 4).Value
= RPM.Value
Worksheets("Export Sheet").Cells(12, 2).Value
= D.Value
Worksheets("Export Sheet").Cells(13, 2).Value
= R.Value
Worksheets("Export Sheet").Cells(12, 4).Value
= L.Value
Worksheets("Export Sheet").Cells(13, 4).Value
= A.Value
Worksheets("EXPORT SHEET").Activate
Range("G10").Select
Sheet11.Pictures.Insert(PIC).Select
GIF.Hide
Sheet1.LabNumberSegs.Enabled = True:
Sheet1.LabNumSeg.Enabled = True: Sheet1.NumSegSp.Enabled =
True
Sheet1.Done.Enabled = True
Else: GWF.Show
End If
Else: GWF.Show
End If
End Sub