Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to save a WorkBook to SharePoint?
How to save a WorkBook to SharePoint?
I Dimmed a WorkBook as such: Dim SaveWB As Workbook Now, I’m trying to assign a String to the WB and save it, as such: SaveWB = imgElement.Title SaveWB.Save Application.EnableEvents = False SaveWB.CheckIn True, "Update", True Application.EnableEvents = True ‘imgElement.Title’ comes from SharePoint Set imgElements = HTMLdoc.getElementsByTagName("img") For Each imgElement In imgElements … Next I keep getting an error that says ‘object variable or with block not set’. I don’t know what the ‘imgElement.Title’ will be beforehand so I have to create it dynamically. Any ideas on how to assign this String to a WB? This snippet of code works just fine: If ThisWorkbook.CanCheckIn = True Then MsgBox "Saving Changes and Checking your File into SharePoint now!!" ThisWorkbook.Save Application.EnableEvents = False ThisWorkbook.CheckIn True, "Update", True Application.EnableEvents = True End If Thanks! Ryan--- |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to save a WorkBook to SharePoint?
I don't have access to SharePoint and have never used it.
With that sterling recommendation in mind... The SaveWB object has been declared but it has not been Set. You need: Set SaveWB = imgElement.Title -Or- More likely: Set SaveWB = Workbooks(imgElement.Title) -- Jim Cone Portland, Oregon USA http://www.mediafire.com/PrimitiveSoftware "ryguy7272" wrote in message ... How to save a WorkBook to SharePoint? I Dimmed a WorkBook as such: Dim SaveWB As Workbook Now, I’m trying to assign a String to the WB and save it, as such: SaveWB = imgElement.Title SaveWB.Save Application.EnableEvents = False SaveWB.CheckIn True, "Update", True Application.EnableEvents = True ‘imgElement.Title’ comes from SharePoint Set imgElements = HTMLdoc.getElementsByTagName("img") For Each imgElement In imgElements … Next I keep getting an error that says ‘object variable or with block not set’. I don’t know what the ‘imgElement.Title’ will be beforehand so I have to create it dynamically. Any ideas on how to assign this String to a WB? This snippet of code works just fine: If ThisWorkbook.CanCheckIn = True Then MsgBox "Saving Changes and Checking your File into SharePoint now!!" ThisWorkbook.Save Application.EnableEvents = False ThisWorkbook.CheckIn True, "Update", True Application.EnableEvents = True End If Thanks! Ryan--- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Saving files to Sharepoint site: error 1004 (can't save file) | Excel Programming | |||
Sharing Workbook on SharePoint by many users and Save on SharePo | Excel Discussion (Misc queries) | |||
Search SharePoint for Workbook | Excel Programming | |||
Macro to Save to Sharepoint | Excel Programming | |||
SharePoint instead of Share Workbook? | Excel Discussion (Misc queries) |