Updating autoshapes in excel using vba

State = pp Slide Show Paused End If End With End Sub' -------------------------------------------------------------------------------- ' Copyright 1999-2018, Shyam Pillai, All Rights Reserved. ' This includes both posting free demo projects made from this ' code as well as reproducing the code in text or html format. ' -------------------------------------------------------------------------------- ' You are free to use this code within your own applications, add-ins, ' documents etc but you are expressly forbidden from selling or ' otherwise distributing this source code without prior consent. However I did manage to locate an obscure reference to this feature in the help files. It is possible to assign the same macro to multiple shapes (Action Setting | Macro) and ascertain which shape was the one that invoked the macro by declaring the macro in the manner shown below. I've used only one cell as an example to update across, the but same can be extended to handle to other cells too. The update routine can be performed by simply calling Update XLCells, however if you want to automate the process, set up the excel event handler first and then every time you change the value in B2 of any of the embedded XL (2nd slide to 4th) objects the value on the 1st slide will get updated. This is a single event handler for all excel events. So it doesn't really matter which excel object has been edited this routine will be able to update automatically.

updating autoshapes in excel using vba-8updating autoshapes in excel using vba-2updating autoshapes in excel using vba-66updating autoshapes in excel using vba-42

' -------------------------------------------------------------------------------- ' Copyright 1999-2018, Shyam Pillai, All Rights Reserved. ZOrder mso Send To Back End With End Sub Sub Resume Show() With Slide Show Windows(1) . ' -------------------------------------------------------------------------------- Sub Update XLCells() Dim X As Integer Dim Y As Variant For X = 2 To 4 Y = Y Get Xl Rng Values(Active Presentation. Shapes(1), "B2") Next Set Xl Rng Values Active Presentation. Shapes(1), "B2", Y End Sub Function Get Xl Rng Values(o Shape As Power Point. Range(Rng) End Function Sub Set Xl Rng Values(o Shape As Power Point. Range(Rng) = Value End Sub Three different approaches to the same. Shape, _ Rng As String) As Variant Dim XLObj As Excel. Shape, _ Rng As String, Value As Variant) Dim XLObj As Excel. One which hides the buttons alternately and the other which merely manipulates the Z-order. ' This includes both posting free demo projects made from this ' code as well as reproducing the code in text or html format. ' -------------------------------------------------------------------------------- ' You are free to use this code within your own applications, add-ins, ' documents etc but you are expressly forbidden from selling or ' otherwise distributing this source code without prior consent. ' --------------------------------------------------------------------------------Sub Extract Wav File() Dim o Shp As Shape Set o Shp = Active Window.

Leave a Reply