• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

没办法以编程方式Excel工作簿签入Powerpoint

用户头像
it1352
帮助1

问题说明

我有一个问题已经解决了好几个星期,用尽了我所有的可用资源.

我正在工作的工作簿中有一个宏.该宏签出另一个电子表格(我要对其进行更改),然后应将其签回.当我运行宏时,它签出文件并打开它.然后,它进入签入子例程,但失败,并显示消息运行时错误1004,对象"_Workbook"的方法"CheckIn"失败.我尝试完全限定签入,但结果相同.下面宏中的代码.
任何帮助将不胜感激,因为我完全不知所措!
迈克

I have a problem that I have been working on for several weeks, exhausting all resources I have available.

I have a macro in the workbook that I am working in. The macro checks out a different spreadsheet (that I will want to make changes to) and then should check it back in. When I run the macro, it checks out the file and opens it. It then proceeds to the checkin subroutine, but fails with the message run-time error 1004 "Method ''CheckIn'' of object ''_Workbook'' failed. I tried fully qualifying the checkin, but have the same results. I am including the code from the macro below.
Any assistance would be greatly appreciated, as I am totally stumped!
Mike

Option Base 1
Public wb0 As Workbook
Public xlFile0 As String
Public FileName0 As String
Sub Automation_Vetting_Process()
 xlFile0 = "http:// ..." 'Actual SharePoint URL
 CheckoutFile (xlFile0)
 FileName0 = wb0.Name
 CheckinFile (FileName0)
End Sub
Sub CheckoutFile(FileName As String)
' Determine if workbook can be checked out
 If Application.Workbooks.CanCheckOut(xlFile0) Then
  Application.Workbooks.CheckOut xlFile0
  Set wb0 = Application.Workbooks.Open(xlFile0)
  MsgBox wb0.Name & " is checked out to you."
 Else
  MsgBox "You are unable to checkout the at this time."
 End If
End Sub
Sub CheckinFile(FileName As String)
' Determine if workbook can be checked in
 If Application.Workbooks(FileName).CanCheckIn = True Then
  Application.Workbooks(FileName).CheckIn SaveChanges:=True, Comments:="", MakePublic:=False
  MsgBox FileName & " was checked in."
 Else
  MsgBox "You are unable to checkin the " & FileName & " spreadsheet at this time."
 End If
End Sub

正确答案

#1
对于这则帖子的标题不正确,我深表歉意.应该是无法以编程方式将Excel工作簿签到Sharepoint.
I apologize for the incorrect title of this post. It should have been "Cannot programatically checkin Excel workbook to Sharepoint.

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /reply/detail/tanhcgaejk
系列文章
更多 icon
同类精品
更多 icon
继续加载