ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA - Monthview working with textboxes (https://www.excelbanter.com/excel-programming/431029-vba-monthview-working-textboxes.html)

Eddie_SP

VBA - Monthview working with textboxes
 
I have an UserForm with one Textbox and one Monthview standard calendar.

When I click on a date, I need this date to be shown on this Textbox and
only later I will confirm that date to be insert in a cell by clicking on a
CommandButton.

Can someone help me with that, please?

Jacob Skaria

VBA - Monthview working with textboxes
 
Do you mean

Private Sub Calendar1_Click()
TextBox1.Text = Calendar1.Value
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Eddie_SP" wrote:

I have an UserForm with one Textbox and one Monthview standard calendar.

When I click on a date, I need this date to be shown on this Textbox and
only later I will confirm that date to be insert in a cell by clicking on a
CommandButton.

Can someone help me with that, please?


Eddie_SP[_2_]

VBA - Monthview working with textboxes
 
Hi Jacob !
First of all, thank you !

Instead of "Calendar1", I changed to "MonthView1", so it finally solved my
problem !

Private Sub MonthView1_DateClick(ByVal DateClicked As Date)
TextBox1.Text = MonthView1.Value
End Sub

Thank you once again !!!

"Jacob Skaria" wrote:

Do you mean

Private Sub Calendar1_Click()
TextBox1.Text = Calendar1.Value
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Eddie_SP" wrote:

I have an UserForm with one Textbox and one Monthview standard calendar.

When I click on a date, I need this date to be shown on this Textbox and
only later I will confirm that date to be insert in a cell by clicking on a
CommandButton.

Can someone help me with that, please?


Jacob Skaria

VBA - Monthview working with textboxes
 
Cheers!

If this post helps click Yes
---------------
Jacob Skaria


"Eddie_SP" wrote:

Hi Jacob !
First of all, thank you !

Instead of "Calendar1", I changed to "MonthView1", so it finally solved my
problem !

Private Sub MonthView1_DateClick(ByVal DateClicked As Date)
TextBox1.Text = MonthView1.Value
End Sub

Thank you once again !!!

"Jacob Skaria" wrote:

Do you mean

Private Sub Calendar1_Click()
TextBox1.Text = Calendar1.Value
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Eddie_SP" wrote:

I have an UserForm with one Textbox and one Monthview standard calendar.

When I click on a date, I need this date to be shown on this Textbox and
only later I will confirm that date to be insert in a cell by clicking on a
CommandButton.

Can someone help me with that, please?



All times are GMT +1. The time now is 02:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com