If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
a sample question about excel VBA
How can I make msgbox like this?
¡÷ there are X sheets of this workbook the first page name is : Sheets(1).Name the secod page name is : Sheets(2).Name ¡õ until to the last page the X page mane is : Sheets(X).Name How can I write this module? |
#2
|
|||
|
|||
Sub WorksheetNames()
Dim i As Long Dim strAnswer As String strAnswer = _ "There are " & Worksheets.Count & _ " sheets of this workbook" For i = 1 To Worksheets.Count strAnswer = strAnswer & vbCr & _ "Sheet " & i & " : " & _ Application.Worksheets(i).Name Next i MsgBox strAnswer End Sub Hope this helps "¬f©÷" wrote in message ... How can I make msgbox like this? ¡÷ there are X sheets of this workbook the first page name is : Sheets(1).Name the secod page name is : Sheets(2).Name ¡õ until to the last page the X page mane is : Sheets(X).Name How can I write this module? |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Windows in Taskbar | Chevy | General Discussion | 8 | October 15th, 2004 03:57 PM |
Question regading use of the Excel object library | robodale | Worksheet Functions | 2 | September 7th, 2004 04:59 PM |
Linked Excel file question. | HeyMoe! | General Discussion | 1 | September 2nd, 2004 01:51 PM |