Going back to the cell you originated

D

daniels012

I know this is going to be a simple answer. I am new to code.

I enter code to put a message box up.

After the user hits ok I want it to take them back to the same cel
they started from instead of going to the next cell.

What would I write for code?


Michael:
 
G

Gord Dibben

Michael

To put up a message box, you don't have to select any cell.

Sub test()
MsgBox "hello there"
End Sub

But, your question leads me to believe you want more than that.

Sub test()
Set startat = ActiveCell
Range("B44").Select
MsgBox "You're now at Cell W44"
startat.Select
End Sub

What do you want to do and from where?

Gord Dibben Excel MVP
 
Top