Ahoj chcel by som poslat iba sheet tabulka .. neviem ci by sa to dalo tak aby sheet tabulka bola priloha spravy ..
Dakujem
Mam este jeden today ohladom predosleho kodu ( pocet kopii tabulky) dalo by sa to tak aby makro kopirovalo iba vyditelne riadky? skusal som upravit premennu pocet_radku takto .Rows(pocet_radku).Hidden ale nefunguje :(
Sub kopiruj_tabulku()
Dim pocet_radku As Integer
Dim pocet_sloupcu As Integer
Dim volny_radek As Long
Dim pocet_kopii As Integer
Dim i As Integer
Dim msg As Byte
Application.ScreenUpdating = False
If Sheets("Hárok1").Range("B2").Value >= 1 Then
pocet_kopii = Sheets("Hárok1").Range("B2").Value
Else
msg = MsgBox("Nebyl vybrán adekvátní počet kopií!", vbCritical + vbOKOnly)
Exit Sub
End If
pocet_radku = Sheets("Hárok1").Range("A1000000").End(xlUp).Row
.Rows(pocet_radku).Hidden
If pocet_radku < 9 Then
msg = MsgBox("Není vytvořena tabulka!", vbCritical + vbOKOnly)
Exit Sub
End If
pocet_sloupcu = Sheets("Hárok1").Range("XFD9").End(xlToLeft).Column
Sheets("Hárok1").Range(Range("A9"), Cells(pocet_radku, pocet_sloupcu)).Select
Selection.Copy
Sheets("tabulka").Activate
For i = 1 To pocet_kopii Step 1
volny_radek = Sheets("tabulka").Range("A1000000").End(xlUp).Row + 2
Sheets("tabulka").Range("A" & volny_radek).Select
ActiveSheet.Paste
Next i
Application.CutCopyMode = False
Sheets("tabulka").Cells(volny_radek + 1, 1).Select
Sheets("Hárok1").Activate
Sheets("Hárok1").Range("B2").Select
Application.ScreenUpdating = True
Dakujem za pomoc s pozdravom D.
citovat