View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tim Williams Tim Williams is offline
external usenet poster
 
Posts: 1,588
Default Why my selection is lost with MsgBox?

Get a reference to the selection before you pop up the messagebox.

dim rngSel as range
set rngSel = selection
'do stuff which might change selection
'operate on rngSel

However, msgbox doesn't change the selection for me, so maybe you're
doing something else in your code?

Tim

"MLevesque" wrote in message
...
I have a rows selection to delete, and using a msgbox I want to ask
user to
do ok or cancel, but when the msgbox is popup, my rows selection is
lost :o(
How could I avoid that problem? Thank you!