Jak na domácí síť 4: síťová úložiště a jejich uplatnění
Maxiforum.cz - Bavte se po svém..
Moderátoři: Mods_senior, Mods_junior
od Jan Pašek » 18 Čer 2012 21:12
Sub seznam_listu()
Dim ceLL As Range
Columns(1).ClearContents
For i = 1 To Sheets.Count
If i < 6 Or i = 7 Or i = 8 Then
Cells(i, 1) = Sheets(i).Name
Else
Cells(i, 1) = Sheets(i).ceLL(4, 17)
End If
Next
End Sub
od Azuzula » 18 Čer 2012 23:03

od Jan Pašek » 03 Črc 2012 20:37
Sub seznam_listu()
Dim ceLL As Range
If Range("A3") <> "Obsah knihy revizní a kontrol el.spotřebičů během užívání" Then
Range("A3") = "Obsah knihy revizní a kontrol el.spotřebičů během užívání"
End If
If Range("A4") <> "Název listu" Then
Range("A4") = "Název listu"
End If
If Range("B4") <> "Pořadí listu" Then
Range("B4") = "Pořadí listu"
End If
For i = 2 To Sheets.Count
If i < 8 Then
Cells(i + 3, 1).ClearContents
Cells(i + 3, 1) = Sheets(i).Name
Cells(i + 3, 2).ClearContents
Cells(i + 3, 2) = i
Else
Cells(i + 3, 1).ClearContents
Cells(i + 3, 1) = Sheets(i).Range("Q4")
Cells(i + 3, 2).ClearContents
Cells(i + 3, 2) = i
End If
Next i
For Each ceLL In Range("A5", Range("A5").End(xlDown))
ceLL.Hyperlinks.Add anchor:=ceLL, Address:="", _
SubAddress:="'" & ceLL.Value & "'" & "!a1", ScreenTip:="Kliknutím se přesuneš do tohoto listu", TextToDisplay:=ceLL.Value
Next
End Sub

od Jan Pašek » 04 Črc 2012 08:19

od cmuch » 19 Črc 2012 13:57
Od listu č 7 potřebuji odkazovat na první prázdnou buňku po poslední editované buňce ve sloupci A
Sub seznam_listu()
Dim i As Integer
Dim FrstEmptyRow As Long
Sheets(1).Select ' zde napsat list na kterem se ma makro vykonat - zde prvni
Range("A3") = "Obsah knihy revizní a kontrol el.spotøebièù bìhem užívání"
Range("A4") = "Název listu"
Range("B4") = "Poøadí listu"
For i = 2 To Sheets.Count
If i < 8 Then
' nazev listu dle bunky
Cells(i + 3, 1).ClearContents
Cells(i + 3, 1) = Sheets(i).Name
' hyper.odkaz
Cells(i + 3, 1).Hyperlinks.Add Anchor:=Cells(i + 3, 1), Address:="", _
SubAddress:="'" & Cells(i + 3, 1).Value & "'" & "!a1", _
ScreenTip:="Kliknutím se pøesuneš do tohoto listu", _
TextToDisplay:=Cells(i + 3, 1).Value
' poradi listu
Cells(i + 3, 2).ClearContents
Cells(i + 3, 2) = i
Else
' nazev listu dle bunky
Cells(i + 3, 1).ClearContents
Cells(i + 3, 1) = Sheets(i).Range("Q4")
' prvni prázdna bunka v sl. A na listu i
FrstEmptyRow = Sheets(i).Cells(Rows.Count, 1).End(xlUp).Row + 1
' hyper.odkaz
Cells(i + 3, 1).Hyperlinks.Add Anchor:=Cells(i + 3, 1), Address:="", _
SubAddress:="'" & Sheets(i).Name & "'" & "!a" & FrstEmptyRow, _
ScreenTip:="Kliknutím se pøesuneš do tohoto listu", _
TextToDisplay:=Cells(i + 3, 1).Value
' poradi listu
Cells(i + 3, 2).ClearContents
Cells(i + 3, 2) = i
End If
Next i
End Sub
Uživatelé procházející toto fórum: Azuzula, CommonCrawl [Bot], ZdeF a 6 anonymních uživatelů