小编Mar*_*her的帖子

以编程方式更改键盘布局

我在一家瑞士公司环境中工作,使用de-CH标准键盘布局,同时使用de-DE键盘。

我可以手动将键盘设置更改为首选de-DE布局,将其设置为标准并分配快捷方式。

但是:不知何故,我的设置在任意时间后消失(可能与管理员运行的更新有关),所以我必须每隔几天重复一次。

表明有一种简单的方法可以在 Win 8 中使用 Powershell 更改键盘布局:

Set-WinUserLanguageList -LanguageList DE-DE

遗憾的是,我使用的是 Win 7。因此,我收到以下错误消息,作为 Powershell 虚拟对象,我将其解释为简单的声明:Win 7 中不存在该 cmdlet:

PS C:\Users\b036081> Set-WinUserLanguageList -LanguageList DE-DE
Set-WinUserLanguageList : The term 'Set-WinUserLanguageList' is not recognized as the name of a cmdlet, function, 
script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path 
is correct and try again.
At line:1 char:1
+ Set-WinUserLanguageList -LanguageList DE-DE …
Run Code Online (Sandbox Code Playgroud)

powershell

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

如何处理“ Microsoft Excel正在等待另一个应用程序完成OLE操作”

当使用excel自动化其他MS-Office应用程序时,我经常会收到仅显示正常提示的提示, Microsoft Excel is waiting for another application to complete an OLE action.

这仅在使冗长的任务自动化时才会发生。

我该如何以适当的方式处理呢?

最近的两个示例(我认为代码不太重要):

  • 使用Excel从Excel创建accdb数据库,Access.Application并通过对大量数据运行相当复杂的SQL查询来填充该数据库。

    Public Function createDB(pathDB As String, pathSQL As String) As String
    
        Dim dbs As DAO.Database
        Dim sql As String
        Dim statement As Variant, file As Variant
    
        Dim sErr As String, iErr As Integer
    
        With New Access.Application
    
            With .DBEngine.CreateDatabase(pathDB, dbLangGeneral)
    
                For Each file In Split(pathSQL, ";")
    
                    sql = fetchSQL(file)
                    For Each statement In Split(sql, ";" & vbNewLine)
                        If Len(statement) < 5 Then GoTo …
    Run Code Online (Sandbox Code Playgroud)

excel vba ole

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

标签 统计

excel ×1

ole ×1

powershell ×1

vba ×1