Open Version History in SharePoint

saint_2008

Board Regular
Joined
Sep 6, 2007
Messages
103
Morning all,

I'm trying to open excel's version history in SharePoint using the app version of excel,

So Far, I have it opening SharePoint URL.

But the send-keys command goes to Chrome and not the SharePoint excel sheet. I've even played a mouse click in the code to see if that would focus it on SharePoint before doing the send-keys command,

VBA Code:
Public Sub OpenUrl()

    Dim lSuccess As Long
    lSuccess = ShellExecute(0, "Open", "https:sharepoint.com/excel" 'Link Removed

Application.Wait (Now + TimeValue("00:00:05"))

  'mouse_event MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0
  'mouse_event MOUSEEVENTF_LEFTUP, 0, 0, 0, 0

  Dim cmt As Comment
  Set cmt = ActiveCell.Comment
  If cmt Is Nothing Then
    ActiveCell.AddComment Text:=""
  End If
  SendKeys "%fip"

End Sub
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Resolved, worked it out ALT F is the command to open Chrome Menu breaking It down means I could get to Excel function on the page.

VBA Code:
Public Sub OpenUrl()



    Dim lSuccess As Long
    lSuccess = ShellExecute(0, "Open", "https:sharepoint.com/excel")

Application.Wait (Now + TimeValue("00:00:05"))

SendKeys "%"
Application.Wait (Now + TimeValue("00:00:01"))
SendKeys "f"
Application.Wait (Now + TimeValue("00:00:01"))
SendKeys "i"
Application.Wait (Now + TimeValue("00:00:01"))
SendKeys "p"


End Sub
 
Upvote 0
Solution

Forum statistics

Threads
1,223,234
Messages
6,170,891
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top