Add the following code:
Option Explicit
Private Sub DTPicker1_Change ()
ActiveCell. Value=https://bbs.csdn.net/topics/DTPicker1.Value
DTPicker1. Visible=False
End Sub
Private Sub Worksheet_SelectionChange (ByVal Target As Range)
With Me. DTPicker1
If the Target. The Column=1 And the Target. The Count=1 Then
The Visible=True
. Width=Target. Width + 15
. Left=Target. Left
. The Top=Target. The Top
. The Height=Target. Height
The Else
The Visible=False
End the If
End With
End Sub
Exit the design pattern, running
But, can't close the file and open insert the date of your
Need to edit DTpicker properties in design mode to
O master, I want to open the file to insert date
thank you
CodePudding user response:
Check your macro security level,CodePudding user response:
CodePudding user response:
Security has been reducedCodePudding user response:
O ask the master to reassureCodePudding user response:
2007,May be you save file format has a problem,
Your file suffix is XLSX, this is without a macro workbook,
If you want to make the vba effective, please save when choosing with macro XLSM format,
CodePudding user response:
2013, save format also enable macros, effective every time want to have to use design patterns, point DTPICKER properties, application againCodePudding user response: