• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

macro that displays a message box with a name list of all sheets

Marco1975

New Member
Hi,

it's possible make a macro that displays a message box with a name list of all sheets??
The list should start from the sheet number 7.

The end result should be:

Sheets list:
sheet7 name
sheet8 name
sheet9 name
and so on....

Thanks.
 
Hi,

Is...

Code:
Sub MBOX()
    Dim i As Integer, sh As String
   
    For i = 7 To ThisWorkbook.Sheets.Count
        sh = sh & Chr(10) & ThisWorkbook.Sheets(i).Name
    Next
   
    MsgBox "Sheet List" & sh
End Sub
 
Writing in this thread because my problem is similar. I also want to count of used range beside each worksheet name. where I am going wrong:
>>> use code - tags <<<
Code:
For i = 1 To ThisWorkbook.Sheets.Count
        str = str & Chr(10) & ThisWorkbook.Sheets(i).Name
        'j = j & Chr(10) & ThisWorkbook.Sheets(i).UsedRange.Rows.Count
        'ActiveSheet.UsedRange.Rows.Count
Next
MsgBox str &  j
Please help
 
Last edited by a moderator:
musicarnab
As a new member, You've just read Forum Rules
There is a sentence:
  • Start a new post every time you ask a question, even if the theme is similar. The original author may continue asking questions whilst the post is in progress and of course if you are answering questions you may need to ask questions of the initial poster.
... and explain - what is Your similar problem?
Your code would show str-value as You've coded.
 
Back
Top