小编Mic*_*ney的帖子

运行宏的宏,打开文件并将其另存为值 - 运行时错误1004

我一直收到这个1004运行时错误.我已经缩减了我的编程,所以它不是那么Programception.我认为这可能与使用Excel 2010保存.xls文件有关.不确定.

  1. 当Auto_Root.xls打开时,它运行Sub auto_open(),打开Panel.xls
  2. Panel打开并运行Sub Update(),它按顺序打开不同目录中的7个文件,所有目录都称为Auto_Update.xls
  3. Auto_Update.xsl打开并运行Sub Flat,每个Sub Flat按顺序打开多个文件,并将自己的平面副本保存在另一个目录中.

我已经打开了7个Auto_Update.xls文件中的每一个并且已经独立运行它们并且它们运行时没有错误.当我从Auto_Root运行它们时,我得到一个运行时错误1004.并且其中一个文件突出显示CurrentWB.Save.我甚至将CurrentWB.Save替换为CurrentWB.SaveAs Filename:= TargetFile,FileFormat:= xlNormal并收到相同的运行时错误.

附上的是我的代码.

AutoRoot.xls!自动更新

Sub auto_open()
Application.CutCopyMode = False
Dim PanelFilePath As String
Dim PanelFileName As String
Dim PanelLocation As String
Dim PanelWB As Workbook
    PanelFilePath = "D:\umc\UMC Production Files\Automation Files\"
    PanelFileName = "Panel.xls"
    PanelLocation = PanelFilePath & Dir$(PanelFilePath & PanelFileName)
        Set PanelWB = Workbooks.Open(Filename:=PanelLocation, UpdateLinks:=3)
            PanelWB.RunAutoMacros Which:=xlAutoOpen
            Application.Run "Panel.xls!Update"
            PanelWB.Close
    Call Shell("D:\umc\UMC Production Files\Automation Files\Auto.bat", vbNormalFocus)
Application.Quit
End Sub
Run Code Online (Sandbox Code Playgroud)

Panel.xls!更新

 Sub Update()
Dim RowNumber As Long
Dim AutoUpdateTargetFile …
Run Code Online (Sandbox Code Playgroud)

excel vba excel-2003 excel-vba excel-2013

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

使用Powershell打开Internet Explorer并登录sharepoint

$url = "https://example.sharepoint.com/" 
$username="JohnDoe@example.com " 
$password="Password" 


$ie = New-Object -com internetexplorer.application; 
$ie.visible = $true; 
$ie.navigate($url);


while ($ie.Busy -eq $true) 
{ 
    Start-Sleep -Milliseconds 1000; 
} 
$ie.Document.getElementById("login").value = $username 
$ie.Document.getElementByID("Passwd").value=$password 
$ie.Document.getElementById("cred_sign_in_button").Click();
Run Code Online (Sandbox Code Playgroud)

目前我有这个代码在powershell(而不是sharepoint powershell)中运行它首先打开Internet Explorer,然后输入登录名和密码.

我无法做到的是获取代码来选择登录按钮.有谁知道我应该有什么价值来选择按钮?

谢谢

它应该是代码的这一部分.$ ie.Document.getElementById( "cred_sign_in_button")点击().

这是登录按钮的源代码.

      <span id="cred_sign_in_button" tabindex="11" onclick="Post.SubmitCreds();return false;"
            class="button normaltext cred_sign_in_button refresh_domain_state" role="button">Sign in</span>
                    <div id="recover_container" class="subtext smalltext">
          <span>
Run Code Online (Sandbox Code Playgroud)

powershell sharepoint internet-explorer

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

使用VBA如何调用Adobe Create PDF功能

  Sheets("Key Indicators").ExportAsFixedFormat Type:=xlTypePDF,
 Filename:=ArchivePath, Quality:=xlQualityStandard,
 IncludeDocProperties:=True, IgnorePrintAreas _
         :=False, OpenAfterPublish:=False
Run Code Online (Sandbox Code Playgroud)

目前这就是我所拥有的.

我理解如何ExportAsFixedFormat PDF,但我需要知道的是使用VBA访问Acrobat下的Create PDF功能(如下图所示).如果我执行ExportAsFixedFormat,链接会变平.Acrobat"创建PDF"允许我将Excel转换为包含超链接的PDF.

AdobePDFMakerForOffice

我该怎么办?

我使用的是Excel 2016和Adobe Pro DC

在此输入图像描述 这些是我的adobe参考

pdf excel acrobat vba excel-vba

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

使用jquery动态确定表单变量

更新

jsfiddle.net/xDA9p/2与此类似.除了电子邮件或网站之外,它将自动确定Image_ID

实际上,如果有人可以通过向我展示如何在单击某个按钮时自动更新图像ID的输入表单来帮助我,这足以得到我需要做的事情.谢谢!

目前,如果您注意到必须手动放入Image_ID.我试图摆脱打字,所以当有人选择图像时,他们可以立即对该图像进行评论!

 <!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
        <title>
            Untitled Document
        </title>

        <cfquery datasource="AccessTest" name="qTest">
            SELECT P.Account, P.Image, P.Image_ID, C.Remarks, C.Users, C.Accounts, C.Date_Time
            FROM PictureDB AS P
            INNER JOIN CommentsDB AS C
            ON C.Image_ID = P.Image_ID
            ORDER BY P.Image_ID
        </cfquery>

        <script src="http://code.jquery.com/jquery-2.0.3.js">

        </script>

        <script>
            $(document).ready(function(){
                  var images = {
                    <cfoutput query="qTest" group="Image_ID">
                        "#qTest.Image_ID#": {
                            "image": "#qTest.Image#",
                            "remarks": [
                            <cfoutput>
                                "#qTest.Users#, #qTest.Date_Time# <br> #qTest.Remarks# <br> </br>",
                            </cfoutput>
                            ]
                        },
                    </cfoutput>
                };
                  $("button").click(function(event){
                    event.preventDefault();
                    var id = $(this).data("id"); …
Run Code Online (Sandbox Code Playgroud)

html javascript forms coldfusion jquery

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

Excel宏按钮

有没有办法在Excel中创建一个按钮来触发宏.所以说我有一个按钮,显示"开始",我可以单击以启动宏而不是使用热键.

excel vba excel-vba

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

背景颜色与文本颜色相同

目前我有以下代码.

#Image_ID {
    color: #000066;
    font: normal 10pt Verdana, Helvetica, Arial;
    background: none;
    border: none;
}
Run Code Online (Sandbox Code Playgroud)

这使我的输入框变白并摆脱了边界.但是输入值时,该值为黑色.我想要的是,当输入文本时,它与背景颜色相同,因此它实际上是不可见的.

html css

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

使用Div和.load显示图像

我如何获得此代码来显示图像?我正在使用iFrame,但被告知我是否最终想要将文本链接到使用Div和.load的每张图片会更好.尽管使用Div,我似乎无法加载任何东西.

......

这就是我现在截至2013年12月26日

我已经能够整合到目前为止学到的所有信息.

<!DOCTYPE html>
 <html>
    <cfquery datasource="AccessTest" name="qTest">
        SELECT Account, Image, Image_ID
        FROM PictureDB
    </cfquery>
Run Code Online (Sandbox Code Playgroud)

SELECT Accounts,Remarks,Users,Image_ID FROM CommentPicture

    <script src="http://code.jquery.com/jquery-2.0.3.js"> </script>

<script>
$(document).ready(function(){

    var images = {

    <cfloop query="qTest">
    "<cfoutput>#qTest.Image_ID#</cfoutput>": "<cfoutput>#qTest.Image#</cfoutput>",
    </cfloop>
    };

    $("button").click(function(event){
        event.preventDefault();
        var id = $(this).data("id");
        var src = images[id];

        $("#theImage").attr("src", src).removeClass("hide");

    });

});
</script>

<div id="div1">
    <h2>Display Image</h2>
</div>

    <cfoutput query="qTest">
        <button data-id="#qTest.Image_ID#">#qTest.Account# </button>
    </cfoutput>
    <img id="theImage" class="hide">
</html>
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述 在此输入图像描述 在此输入图像描述

javascript css coldfusion jquery ms-access

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

Img Src或data-imgsrc Coldfusion

我要做的是根据点击的按钮显示图像.到目前为止,这就是我所拥有的.我也碰到了一些叫做的东西.http://rvera.github.io/image-picker/

我的问题是我单击第一个按钮,数据库中的第一张图片出现,但您无法显示任何其他图片.我还使用了ORDER BY函数来测试其他照片是否正常工作.因此它似乎停留在数据库中的第一张照片上,或者首先排序后.在此输入图像描述在此输入图像描述

 <!DOCTYPE html>
 <html>
<head>
    <cfquery datasource="AccessTest" name="qTest">
        SELECT Account, Image, Image_ID
        FROM PictureDB
    </cfquery>
    <script src="http://code.jquery.com/jquery-2.0.3.js">

    </script>
    <script>
        $(document).ready(function(){
            $("button").click(function(){
                $("#div1").html('<img src="<cfoutput>#qTest.Image#</cfoutput>">');
            });
        });
    </script>
</head>
<body>
    <div id="div1">
        <h2>
            Display Image
        </h2>
    </div>
    <cfloop query="qTest">
        <button> 
         <cfoutput>
                <tr>
                    <td>
                        #qTest.Account#
                    </td>

                </tr>
            </cfoutput>
        </button>
    </cfloop>
</body>
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述 在此输入图像描述 在此输入图像描述

<!DOCTYPE html>
<html>
<head>
    <cfquery datasource="AccessTest" name="qTest">
        SELECT Account, Image, Image_ID
        FROM PictureDB
    </cfquery>
    <script src="http://code.jquery.com/jquery-2.0.3.js">

    </script>
    <script>
        $(document).ready(function(){
            var _img = [];
            <cfoutput query="qTest">
                _img.push({'id': '#qTest.Image_ID#', 'src': '#qTest.Image#'}); …
Run Code Online (Sandbox Code Playgroud)

html javascript coldfusion jquery ms-access

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

ColdFusion cfoutput&排除项目

 <cfif dir.name IS NOT "Thumbs.db">
Run Code Online (Sandbox Code Playgroud)

此代码排除Thumbs.db在cfoutput查询中被调用,但如果我想要排除另一个文件该怎么办?不知道如何排除多个项目.

现在有

 <cfset counter = 1 />
 <cfoutput query="dir1">
 <cfif !listfindNoCase( 'Thumbs.db,2. Electric Accounts Tracking Report.xls,1. Electric Accounts Performance Analytics.xls', dir1.name) > 
<a href="/091_AU20100226/020_Cost_Analyses/010_Electric/Flatten_Files/#dir1.name#" target="_blank">
#dir1.name#</a><br /> 
<cfset counter++ /> </cfif> </cfoutput>
Run Code Online (Sandbox Code Playgroud)

coldfusion coldfusion-10

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