K
K
Hi all, I have macro below which works fine but the only thing that
progress bar don’t complete it self. I know I need to do something on
line
Sheets("Search").ProgressBar1 = SrchShRowCount
I did few experiments but had no success. Please can any friend can
help
Macro*************************************************
Sub srchtransvire()
LstCel = Sheets("DATA").Cells(Rows.Count, "A").End(xlUp).Row
bx = Sheets("Search").TextBox1.Value
DataShRowCount = 2
SrchShRowCount = 9
Srchnum = bx
With Sheets("DATA")
Sheets("Search").ProgressBar1.Visible = True
Sheets("Search").ProgressBar1.Appearance = cc3D
Sheets("Search").ProgressBar1.Appearance = ccFlat
Do While .Range("A" & DataShRowCount) <> ""
If .Range("A" & DataShRowCount) Like "*" & Srchnum & "*" Then
Set CopyRange = .Range("A" & DataShRowCount & ":I" & DataShRowCount)
CopyRange.Copy Destination:=Sheets("Search").Range("A" &
SrchShRowCount)
SrchShRowCount = SrchShRowCount + 1
Sheets("Search").ProgressBar1 = SrchShRowCount
DoEvents
End If
DataShRowCount = DataShRowCount + 1
Loop
End With
Sheets("Search").ProgressBar1.Visible = False
End Sub
**********************************************************
progress bar don’t complete it self. I know I need to do something on
line
Sheets("Search").ProgressBar1 = SrchShRowCount
I did few experiments but had no success. Please can any friend can
help
Macro*************************************************
Sub srchtransvire()
LstCel = Sheets("DATA").Cells(Rows.Count, "A").End(xlUp).Row
bx = Sheets("Search").TextBox1.Value
DataShRowCount = 2
SrchShRowCount = 9
Srchnum = bx
With Sheets("DATA")
Sheets("Search").ProgressBar1.Visible = True
Sheets("Search").ProgressBar1.Appearance = cc3D
Sheets("Search").ProgressBar1.Appearance = ccFlat
Do While .Range("A" & DataShRowCount) <> ""
If .Range("A" & DataShRowCount) Like "*" & Srchnum & "*" Then
Set CopyRange = .Range("A" & DataShRowCount & ":I" & DataShRowCount)
CopyRange.Copy Destination:=Sheets("Search").Range("A" &
SrchShRowCount)
SrchShRowCount = SrchShRowCount + 1
Sheets("Search").ProgressBar1 = SrchShRowCount
DoEvents
End If
DataShRowCount = DataShRowCount + 1
Loop
End With
Sheets("Search").ProgressBar1.Visible = False
End Sub
**********************************************************