Excel for Valentine’s Day – How to Tell Your True Love What You Think Using Excel Macros

WordHerd | 6 月 15, 2017 | 1分钟阅读
分享这篇文章

Need an authentic option to inform the one you love that you just love him/her this Valentine’s Day? Why not e-mail them a workbook with a pop-up message! When your sweetheart opens the workbook, they are going to see a message telling them your true emotions.

Here is the way it works:

1) Create an Excel workbook.

2) Press ALT + F11 to enter the Visible Primary code editor.

three) On the left-hand facet of the code editor you will see Venture Explorer (if you cannot see this, press CTRL + R to open it).

four) It is best to see the workbook title on the left, with Sheet1, Sheet2, Sheet3 还有 ThisWorkbook beneath it. Double-click on ThisWorkbook to connect code to one of many occasion’s within the workbook’s life (on this case, what occurs whenever you open it).

5) You see two drop-down arrows on the high of the code window. Click on on the left one (which at present says Basic) and select Workbook as an alternative (the one different doable possibility).

6) Now you can see the next code:

Non-public Sub Workbook_Open()

Finish Sub

Between these two traces of code, sort in a command to show a message. One thing like this is able to do:

MsgBox “I really like you!”

For a barely extra spectacular system, ask the one you love whether or not they’ll be your Valentine:

Non-public Sub Workbook_Open()

Dim Reply As Lengthy

Reply = MsgBox(“Will you be my Valentine?”, vbQuestion + vbYesNo, “Valentine’s Day”)

If Reply = vbYes Then

MsgBox “Then I will be yours!”, vbExclamation + vbOKOnly

Else

MsgBox “Oh…”, vbExclamation + vbOKOnly

Finish If

Finish Sub

Good luck!

准备好迁移您的网站了吗?

首先进行免费的无义务网站评估。我们将对您的项目进行评估,推荐合适的平台,并为您提供明确的报价。

保证零数据丢失
完整 SEO 保留与重定向映射
准时且按预算交付
专业化的平台专家,而非泛泛的专家

请告诉我们您的网站信息

"*"*” 表示必填字段

此字段用于验证目的,不应更改。
姓名*