Message box help

D

DavidM

Hi

In sheet1 A2 to A500 are numbered, I'm working in sheet2 and run a macro,
when the macro finishes I'd like a message box to popup telling me what the
number is in the cell in sheet1, which moves down 1 cell every time the
macro is run.

Thanks in advance

DaveM
 
M

merjet

Sub macro1()
Static iRow
'do other stuff
If iRow = 0 Then iRow = 1
iRow = iRow + 1
MsgBox Sheets("Sheet1").Range("A" & iRow)
End Sub

Hth,
Merjet
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top