View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Zdenek Moravec Zdenek Moravec is offline
external usenet poster
 
Posts: 5
Default Modeless but waiting form

Hello Bob
There is one main procedu
sub main()
for r = 1 to lastcell
if cells(r,1) = 0 then
MyYesNoForm.Show vbModeless
if Confirmed=True then
'delete the record
end if
end if
next r
end sub
and the User form code contains two procedures:
Private Sub ButtonYes_Click()
Confirmed = True
Unload Me
End Sub
Private Sub ButtonNo_Click()
Confirmed = False
Unload Me
End Sub
I thought, that when the form is displayed, use can swith to sheet. Then
after clicking Yes or No button, event procedure (i.e.
ButtonYes_Click()) is started and 'Confirmed' variable is set.My idea is
wrong.
Zdenek Moravec

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!