Export Date from text box in userform to dtpicker in sheet

jo_hivera

New Member
Joined
May 29, 2020
Messages
28
Office Version
  1. 2019
Platform
  1. Windows
Hello!

i'm having trouble linking a Date box from a userform to a dtpicker in sheet (because i need the dtpicker with calendar available if the date is to be altered).

I have tried this code, but obviously it didn't work...DATE1 is the box in the userform and DTPicker1 (from the development section) is inserted in the sheet
VBA Code:
Private Sub Submit1_Click()
 Dim Ws As Worksheet
 Set Ws = Worksheets("Sheet1")
    Ws.Cells(9, 11).Value = PART1.Value
    Ws.Cells(10, 11).Value = FILE1.Value
    Ws.Cells(9, 19).Value = ANNUAL1.Value
    Ws.Cells(10, 20).Value = MINLSIZE1.Value
    Ws.Cells(11, 20).Value = PTSHOT1.Value
    Ws.Cells(13, 11).Value = INJ1.Value
    Ws.Cells(13, 17).Value = INJ2.Value
    Ws.Cells(14, 11).Value = INJ3.Value
    Ws.Cells(16, 11).Value = RISK1.Value
    
Me.DATE1.Value = Ws.DTPicker1.Value
    
 PART1.Value = ""
 FILE1.Value = ""
 ANNUAL1.Value = ""
 MINLSIZE1.Value = ""
 PTSHOT1.Value = ""
 INJ1.Value = ""
 INJ2.Value = ""
 INJ3.Value = ""
 RISK1.Value = ""
 
 UserForm2.Hide

Suggestions?
Thanks in advance.
 

Attachments

  • Sem Título.png
    Sem Título.png
    106.7 KB · Views: 17

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

Forum statistics

Threads
1,214,907
Messages
6,122,181
Members
449,071
Latest member
cdnMech

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