Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Oct 2002
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cancel Button on Application.GetAddress Browse Dia (Word 2003 SP 1)

    Is there any way to find out if a user presses the Cancel button of the Application.GetAddress browse dialog (DisplaySelectDialog:=1, SelectDialog:=0)?

    If a user presses Cancel, I want to end my Sub instead of manipulating the returned data. Right now, I'm using subsequent GetAddress calls without the dialog (DisplaySelectDialog:=2) to get more data. If a user presses Cancel, those subsequent calls are still made using the previously selected address, returning erroneous data.

    Thanks,
    -Steve

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Cancel Button on Application.GetAddress Browse

    Do you get an empty string back when the user cancels? If so, that seems like the most reliable indicator.

    If strAddress = vbnullstring then Exit Sub

    Or something along those lines...

  3. #3
    New Lounger
    Join Date
    Oct 2002
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Cancel Button on Application.GetAddress Browse

    Bingo! That seems to do exactly what I need.

    Grazi.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •