小编Geo*_*rge的帖子

VBA在文件启动时运行/执行某些操作

作为全局变量的替代,我试图读取我在启动时工作的最后一个值.我读了这个:Excel VBA:Workbook_Open,这个.并试图实现我自己的.但目前它没有做任何事情.

Private Sub Workbook_Open()

    MsgBox "Testing.."

End Sub
Run Code Online (Sandbox Code Playgroud)

我注意到当我将以下代码粘贴到我的项目中时,它是在general,而不是在worksheet.我不知道这是不是问题,我已经有一种方法可以听取我的改变worksheet.

编辑:这是我现在的屏幕...... 在此输入图像描述

编辑:我看到发生了什么.****我必须打开视图> Project Exloper>此工作簿****才能点击ThisWorkbook.谢谢您的帮助!

excel vba excel-2003 excel-vba

1
推荐指数
1
解决办法
2万
查看次数

AutoHotKey阵列混乱

我想问的是以下代码两个不同的数组?或者是相同的阵列?在AutoHotKey中,我很困惑如何创建两个不同的数组.我使用了一个非常老版本的AutoHotKey,版本1.0.47.06 ......

; Keep track of the number of discharge cases
date_array_count := 0

; Keep track of the discharge cases date
case_array_count := 0

Array%date_array_count% := "01/01/2014"
Array@case_array_count% := 1001001
Run Code Online (Sandbox Code Playgroud)

而且,如果我有一个变量,我使用=将它分配给数组?或者使用:=?

discharge_date := "01/01/2014"
Array%date_array_count% = discharge_date
Run Code Online (Sandbox Code Playgroud)

arrays automation autohotkey

1
推荐指数
1
解决办法
4146
查看次数

AutoHotKey源代码换行符

有没有办法在AutoHotKey源代码中进行换行?我的代码长度超过80个字符,我希望将它们整齐地分开。我知道我们可以使用其他语言来完成此操作,例如下面的VBA:

http://www.excelforum.com/excel-programming-vba-macros/564301-how-do-i-break-vba-code-into-two-or-more-lines.html

If Day(Date) > 10 _
And Hour(Time) > 20 Then _
MsgBox "It is after the tenth " & _
"and it is evening"
Run Code Online (Sandbox Code Playgroud)

AutoHotKey中是否有源代码换行符?我使用了较旧版本的AutoHotKey,版本1.0.47.06

autohotkey

1
推荐指数
1
解决办法
2357
查看次数

什么是C++前导码,以及get函数的pre-post条件

我是C++的初学者,作业要求我们记录我们的代码(序言,以及函数的事前条件).我想知道它们如何适用于我的学生课程?

特别是,序言究竟是什么意思?对于我的获取方法,前后条件是什么?我觉得他们真的是为了更高级的功能(这些人改变了数据的价值)?

class Student:
{
public:
    // Constructor for the student class, require 4 parameters
    // In the order of string (first name), string (last name), 
    // integer (student ID), string (major)
    Student(string myFirstName, string myLastName, int myID, string myMajor)
    {
        firstName = myFirstName;
        lastName = myLastName;
        uid = myID;
        major = myMajor;
    }

    // Get function for the student's first name
    // Return the student's first name
    string getFirstName()
    {
        return firstName;
    }
    .....

private:
    string firstName; …
Run Code Online (Sandbox Code Playgroud)

c++

0
推荐指数
1
解决办法
5589
查看次数

标签 统计

autohotkey ×2

arrays ×1

automation ×1

c++ ×1

excel ×1

excel-2003 ×1

excel-vba ×1

vba ×1