sdfjh87687
New Member
Hi coders
Macro makes a list of all sheets in a file in first sheet of file. By clicking on sheet name, it moves to picked sheet. When want go back to sheet list, press ctrl+q.
In every new opening of file, it opens at first sheet (sheet list).
All works, but I would like to find some good person to write a macro for:
I need write comments in showed cells near list cells. Problem occur, when I change order of sheets in file. Comments stay at same position. I need move comment cells along with list cells.
Not whole rows, because I don't know what may I add next in future.
I always want make, edit, delete comments in first sheet(Sheet List). But it seems, comments has to be stored somewhere else and called back from that place.
What about to store them in each sheet macros ? Somebody told me to make some Public function(in each sheet ?), which gives back that text into first sheet.
But it would be ineffective to make manually macro for each sheet. Is possible to make overall macro to make automatically other smaller macros ? Also when I add new sheet, that overall macro, would make into new sheet that particular one.
Would be anyone so kind to code it ? This is my last chance. Here previous attempts:
http://www.ozgrid.com/forum/showthread.php?t=195514&p=750198
http://www.mrexcel.com/forum/excel-...ells-proper-list-name-cell-no-whole-rows.html
http://www.excelforum.com/excel-pro...s-to-proper-list-name-cell-no-whole-rows.html
Thanks for any help
main macro + back with macro:
macro for first sheet display on start:
Macro makes a list of all sheets in a file in first sheet of file. By clicking on sheet name, it moves to picked sheet. When want go back to sheet list, press ctrl+q.
In every new opening of file, it opens at first sheet (sheet list).
All works, but I would like to find some good person to write a macro for:
I need write comments in showed cells near list cells. Problem occur, when I change order of sheets in file. Comments stay at same position. I need move comment cells along with list cells.
Not whole rows, because I don't know what may I add next in future.
![RjwwJXa.png](http://i.imgur.com/RjwwJXa.png)
I always want make, edit, delete comments in first sheet(Sheet List). But it seems, comments has to be stored somewhere else and called back from that place.
What about to store them in each sheet macros ? Somebody told me to make some Public function(in each sheet ?), which gives back that text into first sheet.
But it would be ineffective to make manually macro for each sheet. Is possible to make overall macro to make automatically other smaller macros ? Also when I add new sheet, that overall macro, would make into new sheet that particular one.
Would be anyone so kind to code it ? This is my last chance. Here previous attempts:
http://www.ozgrid.com/forum/showthread.php?t=195514&p=750198
http://www.mrexcel.com/forum/excel-...ells-proper-list-name-cell-no-whole-rows.html
http://www.excelforum.com/excel-pro...s-to-proper-list-name-cell-no-whole-rows.html
Thanks for any help
main macro + back with macro:
Code:
Sub Sheet_lister()
Dim ceLL As Range
Dim i As Long
Dim Button1 As Object
Dim Button2 As Object
Dim Ws1 As Worksheet
Dim Ws2 As Worksheet
Dim Exist As Boolean
Application.ScreenUpdating = False
For Each Ws1 In Worksheets
If Ws1.Name Like "Sheet List" Then Exist = True: Exit For
Next
If Exist = True Then
With Sheets("Sheet List")
.Activate
.Columns(1).Clear
End With
Else
Sheets.Add before:=Worksheets(1)
ActiveSheet.Name = "Sheet List"
With Range("A1")
Set Button2 = ActiveSheet.Buttons.Add(Left:=.Left, Top:=.Top, Width:=.Width, Height:=.Height)
End With
With Button2
.Name = "Button2"
.OnAction = "Sheet_lister"
.Characters.Text = "Make list"
.Characters.Font.Name = "Arial"
.Characters.Font.Size = 11
.Characters.Font.Color = vbRed
'.Characters.Font.Bold = True
End With
End If
For i = 2 To Sheets.Count
Cells(i + 1, 1) = Sheets(i).Name
Columns(1).AutoFit
If Columns(1).ColumnWidth < 18 Then
Columns(1).ColumnWidth = 18
End If
Cells(i + 1, 1).NumberFormat = "@* "
Next i
For Each ceLL In Range("A3", Range("A3").End(xlDown))
ceLL.Hyperlinks.Add Anchor:=ceLL, Address:="", _
SubAddress:="'" & Replace(ceLL.Value, "'", "''") & "'" & "!a1", ScreenTip:="Click to move to sheet", TextToDisplay:=ceLL.Value
Next
Range("A3:A" & Cells(Rows.Count, "A").End(xlUp).Row).Font.Underline = xlUnderlineStyleNone
Application.ScreenUpdating = True
Sheets("Sheet List").Activate
End Sub
Sub Back()
Sheets("Sheet List").Activate
End Sub
macro for first sheet display on start:
Code:
Private Sub Workbook_Open()
Sheets("Sheet List").Activate
End Sub