View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
mike mike is offline
external usenet poster
 
Posts: 32
Default More variable problems

Sample code:

Sub test()

With Assistant.NewBalloon
.Heading = "Regional Sales Data"
.Text = "Select the region(s) you want to print."
For i = 1 To 3
.CheckBoxes(i).Text = "Region " & i
Next
.Button = msoButtonSetOkCancel
If .Show = msoBalloonButtonOK Then
dataPrinted = 0
For i = 1 To 3
If .CheckBoxes(i).Checked = True Then
' Code to print region data.
dataPrinted = dataPrinted + 1
MsgBox "Region " & i & " data printed."
End If
Next
If dataPrinted = 0 Then MsgBox "No data printed."
End If
End With
End Sub

regards,

mike