支持需要与vba编程为一个弹出日历 [英] Support needed with vba programming for a pop up calendar

查看:505
本文介绍了支持需要与vba编程为一个弹出日历的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有vba的经验,非常感谢您协助执行弹出式日历用户表单。此链接将引导您到我要在我的工作簿中介绍的日历来源:

I have no experience with vba and would much appreciate your assistance with the implementation of a pop-up calendar user form. This link will direct you to the source of the calendar that I am trying to introduce into my workbook:

http://www.ozgrid.com/forum/showthread.php?t=142603

我已经将类模块,用户窗体和模块复制到我的工作簿中。当我启动宏,这打开一个用户表单,我可以选择日历希望在日历上。
我想要的是能够将日历中选择的日期发送到我的工作簿中的特定单元格。
我非常感谢,如果有人可以指导我通过如何写几行代码,将发送用户表单中选择的日期到我的工作簿中的特定单元格!
再次,我很新的,所以让我知道,如果有什么不清楚在我的解释。我花了很多时间在这,所以任何支持高度赞赏!

I have copied the class module, the user form, and the module into my workbook. When I launch the macro, this opens up a user form where i can select the date wished on a calendar. What I miss is to be able to send the date selected in the calendar to a specific cell in my workbook. I would much appreciate if somebody could guide me through how to write a few lines of code that would send the date selected in the user form to a specific cell in my workbook! Again, I am very new to this so let me know if anything is unclear in my explanation. I have spent a lot of time on this so any support is highly appreciated! It probably only takes a few moments for you but would mean a lot to me!

推荐答案

试试这个 post 。它的semes给一个更好的指导使用 datepicker控件

Try this post. It semes to give a better guide to work with datepicker control. However it shows coding to make an add-in.

因此,最基本的方法是:

Hence most basic approach for you would be to,


  • 添加表单

  • 添加日期控件

  • 代码

,请参阅此文章

但请记住,Excel / Access中的日历控件有时可能会由于我的帖子中提到此原因

But do remember calendar control in Excel/Access can sometimes disappear due this reason mentioned in my post.

如果您计划使用日期选择器控制,这里是将值从表单传递到任何地方的代码)

If you are planning to use date picker control, here is the code to pass the value from form to anywhere you want ;)

Private Sub myDtPicker_Change()
Dim dtDateSelected as Date
   dtDateSelected = myDtPicker.Value
   '-- do anything else
End Sub

这篇关于支持需要与vba编程为一个弹出日历的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆