{{tag>category:"OpenInsight 32-bit" author:"Martin Drenovac" author:"Andrew McAuley" author:"Carl Pates" author:"bob carten"}} [[https://www.revelation.com/the-works|Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community]] ==== Another quick Excel question (OpenInsight 32-bit) ==== === At 06 OCT 2020 04:49:15AM Martin Drenovac wrote: === Thanks to the support in last couple of days, i'm "hammering" thru with Ole calls to Excel, etc I have one new challenge, and i wonder if there's a more subtle solution that my chosen path eg: Range("B13:B14").Select With Selection.Interior .Pattern = xlSolid .PatternColorIndex = xlAutomatic .ThemeColor = xlThemeColorDark2 .TintAndShade = -9.99786370433668E-02 .PatternTintAndShade = 0 End I can select Range I can select Interior, and then I make OlePutProperty calls for each of the properties Is there an abbridged means to set more than one property at a time, as per the format above Cheers, and TIA ---- === At 06 OCT 2020 05:14AM Andrew McAuley wrote: === You DON'T mean using @Rm delimited arrays in your putProperty call? [url=https://www.sprezzatura.com]The Sprezzatura Group[/url] [url=https://www.sprezzatura.com/blog]The Sprezzatura Blog[/url] [i]World leaders in all things RevSoft[/i] [img]https://www.sprezzatura.com/zz.gif[/img] ---- === At 06 OCT 2020 05:21AM Martin Drenovac wrote: === Andrew, seriously that simple Thank you again. ---- === At 06 OCT 2020 05:26AM Andrew McAuley wrote: === Makes maintenance easier and improves speed :). I explained it to our Martyn by saying "If I ask for a 12 pack from the fridge, how many journeys are you going to make?". ;) [url=https://www.sprezzatura.com]The Sprezzatura Group[/url] [url=https://www.sprezzatura.com/blog]The Sprezzatura Blog[/url] [i]World leaders in all things RevSoft[/i] [img]https://www.sprezzatura.com/zz.gif[/img] ---- === At 06 OCT 2020 05:39AM Martin Drenovac wrote: === Good man, cheers again Andrew I would do 12 trips as you'd be aware... ---- === At 06 OCT 2020 05:50AM Andrew McAuley wrote: === Encourages moderation I guess :) [url=https://www.sprezzatura.com]The Sprezzatura Group[/url] [url=https://www.sprezzatura.com/blog]The Sprezzatura Blog[/url] [i]World leaders in all things RevSoft[/i] [img]https://www.sprezzatura.com/zz.gif[/img] ---- === At 06 OCT 2020 09:33AM Martin Drenovac wrote: === Andrew, any chance of some more education i want to insert a .png and having run the macro and i have looked high and low to sort how to exec this i've battled the Object browser, nothing's coming up that looks familiar * Range("I3").Select * ActiveSheet.Pictures.Insert("F:\temp\edmen\dcp\dcp-graphic.png").Select * End Sub I don't "understand" the ActiveSheet.Pictures.Insert bit - i have the excel object of course, and the cell range, however am lost with the rest, esp the 2nd .Select cheers ---- === At 06 OCT 2020 09:56AM Carl Pates wrote: === Martin, When you see a VB/JS statement like that what you usually need to do is break it down for Basic+ (these languages are designed for chained object notation - Basic+ is not) So try something like this (not tested): objSheet = oleGetProperty( objExcel, "ActiveSheet" ) objPix = oleGetProperty( objSheet, "Pictures" ) objPic = oleCallMethod( objPix, "Insert", "F:\temp\edmen\dcp\dcp-graphic.png" ) selVal = oleCallMethod( objPic, "Select" ) [email=cpates@revsoft.co.uk]Carl Pates[/email] ---- === At 06 OCT 2020 10:28AM bob carten wrote: === FWIW, there are times when translating to individual basic+ OleGetproperty / OlePutproperty / OleCallmethod becomes too unwieldy. I will then use the windows scripting control with the Addcode method to create my own OLE object whose methods I can call from Basic+. This is similar to using