Hi,,
i want to run Code on workbook VBA but my flow not working.
-Set sh = ActiveWorkbook.Sheets("Sheet1") : i want to get workbook opendata
Sub test()
Set sh = ActiveWorkbook.Sheets("Sheet1")
Set wb = Workbooks.Add
Set r = sh.Range("A:A")
Set f = r.Find("Com.", , xlValues, xlWhole, , , True)
If Not f Is Nothing Then
cell = f.Address
Do
sh.Range(Sheet1.Cells(f.Row + 1, 1), Sheet1.Cells(f.Row + (f.End(xlDown).Row - f.Row), 30)).Copy wb.Sheets(1).Range("A" & Rows.Count).End(3)(2)
Set f = r.FindNext(f)
Loop While Not f Is Nothing And f.Address <> cell
End If
End Sub
i want to run Code on workbook VBA but my flow not working.
-Set sh = ActiveWorkbook.Sheets("Sheet1") : i want to get workbook opendata
Sub test()
Set sh = ActiveWorkbook.Sheets("Sheet1")
Set wb = Workbooks.Add
Set r = sh.Range("A:A")
Set f = r.Find("Com.", , xlValues, xlWhole, , , True)
If Not f Is Nothing Then
cell = f.Address
Do
sh.Range(Sheet1.Cells(f.Row + 1, 1), Sheet1.Cells(f.Row + (f.End(xlDown).Row - f.Row), 30)).Copy wb.Sheets(1).Range("A" & Rows.Count).End(3)(2)
Set f = r.FindNext(f)
Loop While Not f Is Nothing And f.Address <> cell
End If
End Sub