View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
K[_3_] K[_3_] is offline
external usenet poster
 
Posts: 9
Default Newbie question on UserForm

I am trying to do the following.

The user enters a date (StopDate) in a UserForm text box.
The program checks the date , then asks the User if she wants to change
the date
The User says Yes, then changes the date in the text box, and the
program continues with the new value.

I have the following

UserForm_Initialize( )

UserForm.Show vbModeless

and in the main program I have:

res = MsgBox("Stop Date: " & Dates(iLastDay) & " Yes to Continue, No to
Change Date", vbYesNo + vbCritical)

If res = vbNo Then
UserForm1.Show 'Expecting the UserForm to become active to allow the
User to make the changes
MsgBox "Stop Date Changed ?"
TCStopDate = txtStopDate.Value 'The program picks up the new date
and continues

However this does not work.. The UserForm does not activate to allow the
user to make changes.

Appreciate any suggestions thank you