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

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
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,214,996
Messages
6,122,636
Members
449,092
Latest member
bsb1122

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