Multiple DTPicker Properties

Apratiwi

New Member
Joined
Aug 19, 2014
Messages
1
Hello All,
I am trying to set properties of the Multiple DTPickers.

What i am doing at the moment is like this:

Private Sub TakeDate()
ActiveCell.Value = Me.DTPicker1.Value
ActiveCell.Value = Me.DTPicker2.Value
ActiveCell.Value = Me.DTPicker3.Value
ActiveCell.Value = Me.DTPicker4.Value
ActiveCell.Value = Me.DTPicker5.Value
ActiveCell.Value = Me.DTPicker6.Value
ActiveCell.Value = Me.DTPicker7.Value
ActiveCell.Value = Me.DTPicker8.Value
ActiveCell.Value = Me.DTPicker9.Value
ActiveCell.Value = Me.DTPicker10.Value
ActiveCell.Value = Me.DTPicker11.Value
ActiveCell.Value = Me.DTPicker12.Value
ActiveCell.Value = Me.DTPicker13.Value
End Sub

Silly right? The problem is the number of date picker will keep increasing.
Is there any way i can put indexing for the dtpicker?
or that i can set properties for all dtpicker in a worksheet?

Thanks for the help...
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
That code does not make any sense... each line after the first overwrites what the previous line assigned to the ActiveCell. In other words, all the code you posted can be reduced to this...
Code:
[COLOR=#000000]Private Sub TakeDate()
  ActiveCell.Value = Me.DTPicker13.Value[/COLOR]
End Sub
Is that what you really want? If not, please explain what it is you are trying to do.
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,748
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top