I am opening a file using a variable name. That part works, but once it's open the subprocedure is exited without running the rest of the code. Following is what I have so far..
Sub Compare()
Dim Comp As String
Dim compval As String
Comp = InputBox("Name of Comp File ", "Comp"
'TEST is the result of the input box.
Workbooks.Open Filename:="M:\Excel Issues\" & Comp
Workbooks("TEST"
.Activate
Range("A1"
.Select
compval = ActiveCell.Value
Windows("TEST2"
.Activate
Range("A1"
.Select
Do Until ActiveCell.Value = compval
If ActiveCell.Value = compval Then
'do something
Else
ActiveCell.Offset(0, 1).Range("A1"
.Select
End If
Loop
End Sub
Any suggestions???
Thanks...
Sub Compare()
Dim Comp As String
Dim compval As String
Comp = InputBox("Name of Comp File ", "Comp"
'TEST is the result of the input box.
Workbooks.Open Filename:="M:\Excel Issues\" & Comp
Workbooks("TEST"
Range("A1"
compval = ActiveCell.Value
Windows("TEST2"
Range("A1"
Do Until ActiveCell.Value = compval
If ActiveCell.Value = compval Then
'do something
Else
ActiveCell.Offset(0, 1).Range("A1"
End If
Loop
End Sub
Any suggestions???
Thanks...