Thanks for the additional information.
To step through code in VBA, use the F9 key to set a breakpoint, where code
execution will stop. Then, run the macro. After execution hits the
breakpoint, continue by pressing F8 to execute each statement. In all
likelihood, you'll see where the problem is occurring or where your code
logic isn't quite right.
Assistant is a hidden object in the Outlook object model, and I've never
seen any successful Assistant code for Outlook. If it's making Outlook
crash, I'd seek another approach, i.e. a regular VBA userform.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
What do you mean by "opening a balloon"? What happens when you step
through
the code in the debugger?
Sigh. I don't you remember me, sue but i'm the dork that taught
themselves to write macros by cutting and paste ing from the help
file.
So tell me about stepping through. it is the assistant balloon that
takes you through a selection process with my contacts. here I am
looking for contacts with different names and the same work phone.
Set inq = Assistant.NewBalloon
With inq
.Heading = "Available in Contacts for " & vwork
.Text = "Select one to delete"
For i = 1 To vnumber.Count
.Labels(i).Text = "name " & vnumber(i) & Chr(13) & "work # " &
vnumber(i).BusinessTelephoneNumber & Chr(13) & "home # " & vnumber
(i).HomeTelephoneNumber & Chr(13) & "email " & vnumber
(i).Email1Address & Chr(13) & "user1 " & vnumber(i).User1
Next
.Button = msoButtonSetOK
End With
Select Case inq.Show
Case 1
vnumber(1).Delete
Case 2
vnumber(2).Delete
Case 3
vnumber(3).Delete
Case 4
vnumber(4).Delete
Case 5
vnumber(5).Delete
Case Else
vcombine = True
End Select