View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Charlie Charlie is offline
external usenet poster
 
Posts: 703
Default ok cancel dialog box

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

If Target.Address(False, False) = "A1" Then
If MsgBox("Ready?", vbOKCancel) = vbOK Then MyMacroRunsHere
End If

End Sub


"shishi" wrote:

Hi all,

I am trying to do a simple dialog box. I can't figure out how I can
do this. The user has to select appropriate cell ( by clicking into a
cell) in a work sheet to have the output of a macro go into that cell.
Now I wish to provide a dialog box that has ok and cancel. If the user
is ready for the output, he needs to click and select the appropriate
cell in the sheet and then click ok. If user wants to cancel, he can
click on cancel and the function will not run. I am trying to implement
this..Any ideas..thanks in advance...

shishi