需要使用vba编程支持弹出日历 [英] Support needed with vba programming for a pop up calendar

查看:329
本文介绍了需要使用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 。为了给出更好的指导,使用 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天全站免登陆