Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Message Box
Hi - I want to create a message box which opens at the end of the macro which
tells the user how many records (rows) exist on the worksheet. When user clicks ok, the macro closes. Please tell me how to code the msgbox that will do this. Thanks, Yasser |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Message Box
Put the following code at the end of your procedure.
MsgBox "There are " & Format(ActiveSheet.UsedRange.Rows.Count, "#,##0") & _ " rows on the active sheet.", vbOKOnly, Title:="Title Text" -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (email address is on the web site) "yasser" wrote in message ... Hi - I want to create a message box which opens at the end of the macro which tells the user how many records (rows) exist on the worksheet. When user clicks ok, the macro closes. Please tell me how to code the msgbox that will do this. Thanks, Yasser |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Message Box
Try this:
MsgBox Sheets("Sheet1").UsedRange.Rows.Count & " records" Subtract 1 from the count if there is a header row. Hth, Merjet |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
replace VBA run-time error message with custom message | Excel Programming | |||
Replace Excel Message w/Custom Message | Excel Programming | |||
Intercept/replace standard 'cell protected' message with my own message? | Excel Programming | |||
Opening an attachment of a message that has a message as attachmen | Excel Programming | |||
Displaying a message in a message box without requiring user to click anything to proceed | Excel Programming |