Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I have the error that when i want to execute the macro again i get an error messsage cause teh sshet already exist , is there a way to overwrite it ? Sub ShowOpenTickets() Const Blatt1 = "2004-05-28_Auswertung_D2_VDF" ActiveWorkbook.Worksheets.Add.Name = "Open Tickets" Const Blatt2 = "Open Tickets" Dim i As Integer Dim iAnz As Integer Application.ScreenUpdating = False Sheets(Blatt1).Activate Range("D1").Select iAnz = 0 i = 0 Do Until i = ActiveSheet.UsedRange.Rows.Count If ActiveCell.Value = "in work" Or ActiveCell.Value = "assigned" Then Selection.EntireRow.Copy Sheets(Blatt2).Activate ActiveSheet.Paste ActiveCell.Offset(1, 0).Select Sheets(Blatt1).Select ActiveCell.Offset(1, 0).Select iAnz = iAnz + 1 Else ActiveCell.Offset(1, 0).Select End If i = i + 1 Loop Application.CutCopyMode = False Application.ScreenUpdating = True MsgBox "Es wurden " & iAnz & " Sätze übertragen" End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Merging multiple sheets into one sheet without overwriting data. | Excel Worksheet Functions | |||
overwriting my links | New Users to Excel | |||
Overwriting cells | Excel Discussion (Misc queries) | |||
Overwriting most of a workbook | Excel Discussion (Misc queries) | |||
Overwriting data | Excel Discussion (Misc queries) |