close calendar control form after selection

  • Thread starter Thread starter KUMPFfrog
  • Start date Start date
K

KUMPFfrog

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.
 
If it's on a userform - something like this;
With [userformname].Calendar1
activecell.NumberFormat = "dd-mmm-yy"
activecell.Value = .Value
End With
Unload [userformname]
???
 
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 said:
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 said:
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.
 
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 said:
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 said:
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 said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top