DIM help
Posted by mike k on June 18, 2001 10:14 AM
i am having trouble with the DIM function HOW DO I MAKE IT SO THAT MIKE CAN BE USED MORE THAN ONCE. SO IF "MIKE" CHANGES, it will still work. something like DIM MIKE(##?). thakns!. He is my code.
Private Sub CommandButton6_Click()
Dim mike
Range("BI1").Select
mike = ActiveCell.Formula
Range("B3").Select
Do Until ActiveCell.Formula = ""
If ActiveCell.Formula = mike Then
Selection.EntireRow.Copy
Range("a2").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("B4").Select
Do Until ActiveCell.Formula = ""
If ActiveCell.Formula = mike Then
Selection.EntireRow.Select
Selection.Delete Shift:=xlUp
Application.CutCopyMode = False
Exit Sub
Else
ActiveCell.Offset(1, 0).Select
End If
Loop
Else
ActiveCell.Offset(1, 0).Select
End If
Loop
MsgBox "data not found", vbOKOnly
End Sub