home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2002 December (Special)
/
PCWorld_2002-12_Special_cd.bin
/
Special_komplet
/
special_komplet.exe
/
Prazdne_Radky.bas
< prev
next >
Wrap
BASIC Source File
|
2002-01-03
|
2KB
|
57 lines
Attribute VB_Name = "Prazdne_Radky"
Sub Kopirovani_Prazdnych_Bunek()
Application.ScreenUpdating = False
f = Selection.FormatConditions.Count
If f = 3 Then
MsgBox "Prßv∞ jste pou₧il ji₧ t°i druhy formßtu!"
m = False
GoTo OhneFormat
End If
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
Formula1:="="""""
Selection.FormatConditions(f + 1).Interior.ColorIndex = 5
m = True
OhneFormat:
Antwort = MsgBox("Chcete zkopφrovat data?", vbYesNo + vbQuestion + vbDefaultButton1)
If Antwort = vbYes Then '
z = 1
Vorlage = ActiveSheet.Name
ActiveWorkbook.Sheets.Add After:=Worksheets(Worksheets.Count)
Name = InputBox("Zadejte jmΘno pro nov² list", , "PrßzdnΘ bu≥ky")
ActiveSheet.Name = Name
Sheets(Vorlage).Select
zeile = Selection.Row
endzeile = Selection.Rows.Count
For Each r In Selection.Rows
For Each c In r.Cells
If c.Value = "" Then
Rows(zeile).Copy
Worksheets(Name).Select
Rows(z).Select
Selection.PasteSpecial Paste:=xlFormats
Selection.PasteSpecial Paste:=xlValues
Sheets(Vorlage).Select
z = z + 1
GoTo Ende
End If
Next
Ende:
If zeile + 1 <= endzeile Then
zeile = zeile + 1
Else
zeile = Selection.Row
End If
Next
Sheets(Vorlage).Select
If m Then
Selection.FormatConditions(f + 1).Delete
End If
Application.CutCopyMode = False
End If
Application.ScreenUpdating = True
End Sub