View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
JCIrish JCIrish is offline
external usenet poster
 
Posts: 39
Default pause macro until user selects correct range

Hi, Ron, and thanks. I will try that approach. Here's some code I showed to
Tom. With the command button I ask if the user is ready to paste Quicken
data. The selection change handler is designed to force selection of B2. The
problem I have is that I don't know how to disable the handler after the
selection B2 has been made and the Quicken data pasted. Ever after I'm
prompted to select B2 with each new click! Any solution to this problem?
Thanks.


Private Sub btnStartQuicken_Click()

Dim readyCheck

MsgBox("Are you ready to enter Quicken Values?", vbYesNoCancel)

If readyCheck = vbYes Then

MsgBox "Select Cell B2"
End If
End Sub



Private Sub Worksheet_SelectionChange(ByVal Target As Range)

If Target.Address = Range("B2").Address Then
MsgBox "Paste Quicken Values"

Else
MsgBox "You must select Cell B2"

End If
End Sub


"Ron de Bruin" wrote:

hi JCIrish

Check out

Application.InputBox in the VBA help with Type:=8




--
Regards Ron de Bruin
http://www.rondebruin.nl


"JCIrish" wrote in message ...
Within an event handler for a worksheet command button I display a msgBox
telling user to select a specific cell. When user clicks OK on the msgbox
how do I pause the macro until he selects the correct cell?