Excel中进行怎么插入日期选择器
时间:2022-03-11 18:48:10
就可以弹出日历选择器。
这时的日历控件还比较原始, 在适当的位置绘制日历,打开其他控件选择框,打开代码编辑器, 点击设计模式,注意这是在非编辑模式下才可以实现的。
插入该控件后,当图表颜色变深后就是设计模式,如下: ,日历选择器消失,这时就需要添加自己的代码,在单元格内会插入日期,确定, 在光标处输入下方的代码: ActiveCell = Calendar1.Value Me.Calendar1.Visible = FalseEnd Sub Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Column = 1 Or Target.Column = 2 Then ‘此处的1和2为你要显示日历的列序号 Me.Calendar1.Left = Target.Left Me.Calendar1.Top = Target.To If Target.Value Then Me.Calendar1.Value = Target.Value Else Me.Calendar1.Value = Now( End I Me.Calendar1.Visible = TruElse Me.Calendar1.Visible = FalseEnd If 关闭代码编辑器, 在设计模式下双击日历, 在选择框中选择calendar control8.0,。
并将高度和宽度适当调整,不会点击日期后自动隐藏日历并在单元格内填入日期。
EXCEL除了这个日历控件外还有一个另一个比较简单的日历选择器Microsoft date and time picker control(SP6),选择日期后,点击第一列或者第二列。
再次打开该工作薄。
Excel中进行怎么插入日期选择器 在开发工具栏选择插入-其他控件,在非设计模式下即可点击弹出日期选择界面,将EXCEL保存为启用宏的工作薄。
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
在用word工作中经常遇到的问题
![](https://img.aspxhome.com/file/2023/0/24380_0s.png)
Excel行列怎么置换
![](https://img.aspxhome.com/file/2023/5/36155_0s.jpg)
iOS14.4.1正式版更新内容及升级方法
![](https://img.aspxhome.com/file/2023/0/46100_0s.png)
win10多任务视图怎么添加在任务栏?win10多任务视图添加在任务栏的方法?
![](https://img.aspxhome.com/file/2023/5/47315_2s.jpg)
Excel如何打印网格线?
![](https://img.aspxhome.com/file/2023/1/55191_0s.gif)
在Word中输入根号2.3的图文教程
![](https://img.aspxhome.com/file/2023/6/20846_0s.jpg)
excel如何撤销工作表保护
![](https://img.aspxhome.com/file/2023/6/a140726_0s.jpg)
WPS怎么制作公文的文头
![](https://img.aspxhome.com/file/2023/9/53499_0s.jpg)
VBA怎样关闭工作簿和退出Excel
Win10电脑的软键盘在哪?Win10电脑的软键盘怎么开启?
![](https://img.aspxhome.com/file/2023/8/52348_0s.png)
Word 2013文档添加图片水印或文字水印的方法图解教程
![](https://img.aspxhome.com/file/2023/8/34038_0s.jpg)
怎样撤销excel中的强制换行
在excel中sql索引的操作
word打开失败 提示缺失各种.MSI的解决办法
![](https://img.aspxhome.com/file/2023/3/29033_0s.png)
iOS 14 AirPods 新功能预览:空间音频、自动设备切换,低电量通知……
![](https://img.aspxhome.com/file/2023/1/a194821_0s.png)
word2003在图形里写文字怎样让文字在文本框中间?
![](https://img.aspxhome.com/file/2023/7/19267_0s.jpg)
excel给单元格添加说明,不需要备注,可以用批注功能
![](https://img.aspxhome.com/file/2023/2/a140552_0s.jpg)
wps中怎么设置ppt特效
![](https://img.aspxhome.com/file/2023/7/53477_0s.jpg)
Excel公式获取多个工作表单元格区域的数据组成的数组
![](https://img.aspxhome.com/file/2023/5/a142755_0s.jpg)
Win10系统如何一键清除垃圾bat?
![](https://img.aspxhome.com/file/2023/1/48671_0s.jpg)