Going back to the cell you originated

  • Thread starter Thread starter daniels012
  • Start date Start date
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:
 
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
 

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

Back
Top