Macro that opens a window giving you info in a few cells
Private Sub ShowMessage()
With Sheets("page2")
MsgBox "M1 = " & .Range("M1").Text & vbNewLine & _
"Q1 = " & .Range("Q1").Text & vbNewLine & _
"U1 = " & .Range("U1").Text & vbNewLine & _
"Y1 = " & .Range("Y1").Text
End With
End Sub
Gord Dibben MS Excel MVP
On Wed, 21 Feb 2007 12:52:07 -0800, One-Leg
wrote:
Thanks... It works good but if I have 3 sheets in the document (page1 -
page2 - page3) and when I open the document, I always open the document, I'm
on page1. The info I'm looking for is on page2.
Can I simply do this:
Sub ShowMessage()
With ActiveSheet
MsgBox "M1 = " & .Range("page2!M1").Text & vbNewLine & _
"Q1 = " & .Range("page2!Q1").Text & vbNewLine & _
"U1 = " & .Range("page2!U1").Text & vbNewLine & _
"Y1 = " & .Range("page2!Y1").Text
End With
End Sub
"Vergel Adriano" wrote:
How about something like this:
Private Sub ShowMessage()
With ActiveSheet
MsgBox "M1 = " & .Range("M1").Text & vbNewLine & _
"Q1 = " & .Range("Q1").Text & vbNewLine & _
"U1 = " & .Range("U1").Text & vbNewLine & _
"Y1 = " & .Range("Y1").Text
End With
End Sub
"One-Leg" wrote:
Hello,
I have an Excel document with info being updated on a daily base. I have 4
cells (M1 - Q1 - U1 - Y1) in which I have info.
I would like to run a macro that when launched, it will give me a little
window telling me the 4 infos...
Is that possible???
Thanks!!!
|