+ Reply to Thread
Results 1 to 3 of 3

VBA - Working with Excel 2007 and SharePoint, checking file status

  1. #1
    Registered User
    Join Date
    05-29-2014
    Posts
    5

    VBA - Working with Excel 2007 and SharePoint, checking file status

    I have an issue, I'm working with a file from SharePoint (FileA), "FileA" goes out to Sharepoint and opens "FileB" (if not already open) then copies information from "FileA" to "FileB". However if "FileA" is left open, or someone else has it open I am unable to open "FileA". How in VBA can I check to ensure I don't have it open locally (if so swich and continue), checkout and open in SharePoint (if not already open) or Prompt with options to force checkin, checkout to copy info?

    Fairly new to VBA in Excel, so may need you to dumb down a little.

    Simple VBA copy I used:

    Workbooks.Open FileName:= _
    "http://sharepoint.baaa.com/sites/SCDT_DSD/Weekly_Releases/11.%20Combined%20Weekly%20Task%20List/1/Automated_Status_Update.xlsm"
    Sheets("1").Select
    Range("A1").PasteSpecial Paste:=xlPasteValues


    Thanks in advance for any help you can provide

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: VBA - Working with Excel 2007 and SharePoint, checking file status

    Please Login or Register  to view this content.
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  3. #3
    Registered User
    Join Date
    05-29-2014
    Posts
    5

    Re: VBA - Working with Excel 2007 and SharePoint, checking file status

    From what I read here Nathansav, this procedure would try to open the SP file, but if not able it would specify the error msgbox in this case. But what if the file were already open locally. For example I have open the Automated_Status_Update file already on my computer, from another workbook I open a macro with the above VBA code. I get the error because SP shows the Automated_Status...file is already being used in Edit mode... instead I want to switch to the already open file on my computer and continue the code. Does that make sense? As a secondary questoin: If it's already checked out or being edited by someone else, can I force the file to checkin through VBA code and then run my VBA?

    By the way, my first time in these forums, they seem very useful... I really appreciate your help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Excel 2007 on SharePoint
    By youngbld in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 0
    Last Post: 01-06-2014, 04:29 PM
  2. Sharepoint 2007 and excel formatting
    By maximpinto in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 12-24-2013, 01:44 AM
  3. Replies: 0
    Last Post: 10-08-2013, 10:54 AM
  4. Checking for / Copying a file from external SharePoint site
    By koltregaskes in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-19-2011, 04:15 PM
  5. checking file already open status
    By John F. Collins in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-23-2005, 02:10 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1