View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
KUMPFfrog KUMPFfrog is offline
external usenet poster
 
Posts: 38
Default close calendar control form after selection

Nevermind, I was just missing unload me.

Private Sub calendar1_Click()
FormInvoice.InvDateBox.Value = Format(Calendar1.Value, "dd-mmm-yyyy")
Unload Me
End Sub

thanks for your help

"KUMPFfrog" wrote:

Thanks for the reply, but I am a beginner. . . .
where do i place this code? UserForm for the Calendar, UserForm for the
txtbox, or under sub for the txtbox?

"Hennie Neuhoff" wrote:

If it's on a userform - something like this;
With [userformname].Calendar1
activecell.NumberFormat = "dd-mmm-yy"
activecell.Value = .Value
End With
Unload [userformname]
???
--
HJN


"KUMPFfrog" wrote:

I have a calendar popup upon TextBox1_Enter (). I select the date and it
fills the textbox in, but i want the popup to disapear after that or when
mouse moves off the calendar area.