View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_4_] Jim Thomlinson[_4_] is offline
external usenet poster
 
Posts: 1,119
Default Macro prompts user to run macro?

Give this a try...

If MsgBox("Do you want to update flags?", vbYesNo, "Update
Flags") = vbYes then
[DoIt]
Else
[Don't]
End If

--
HTH...

Jim Thomlinson


"miwarren" wrote:


It did prompt me, but it ran the macro no matter which you chose.
Anymore help???

Thanks

Brett0769 Wrote:
Use a message box to get the choice from the user, here's a sample.

Dim intYN As Integer
intYN = MsgBox("Do you want to update flags?", vbYesNo, "Update
Flags")
If intYN = 6 then
[DoIt]
Else
[Don't]
End If



--
miwarren
------------------------------------------------------------------------
miwarren's Profile: http://www.excelforum.com/member.php...o&userid=24682
View this thread: http://www.excelforum.com/showthread...hreadid=477638