PDA

View Full Version : format a msgbox



lior03
05-05-2006, 01:26 PM
hello
i have a macro in a sheet for findig the last occupied row in column A.how can i format the msgbox to show 1100 as 1,100.
my code is

Sub lastC()
Dim lngRow As Long
lngRow = Sheets("CC").Range("a65536").End(xlUp).row
MsgBox " row " & lngRow & " is the last row "
lngRow = Format(lngRow, "#,##0")
End Sub


thanks

Jacob Hilderbrand
05-05-2006, 01:34 PM
Try this:


MsgBox "row " & Format(lngRow,"#,##0") & " is the last row"