Why Office Scripts Won't Replace VBA

  Рет қаралды 29,020

Excel Macro Mastery

Excel Macro Mastery

Күн бұрын

Пікірлер: 91
@peraruor
@peraruor 2 жыл бұрын
Sad to know that VBA will not be updated, it is such a simple and useful tool. I am hopeful that Microsoft will one day realize the enormous influence that Excel and VBA have on the world and decide to maintain VBA. Thank you so much to take the time and effort to do VBA videos, I enjoy them verry much!
@gYziger
@gYziger Жыл бұрын
Been quite a while since this had been released so things may be different but this is a current question regarding an application I am working on in my current role. Ultimately I feel VBA has much stronger features and has so many more resources out there that scripts just doesn't fit the need for more complex applications that need to grab data from other workbooks, and work immediately without any extra layers needed. Without the same tools as the VBA IDE this makes VBA much stronger as well in my opinion.
@seanconnors3356
@seanconnors3356 3 жыл бұрын
I would use it if it allowed a workbook to interact with other workbooks but that is pretty essential and it is disappointing that it isn't a planned feature. Or if you were able to interact with information in a workbook and a doc or file in OneDrive or SharePoint.
@Excelmacromastery
@Excelmacromastery 3 жыл бұрын
I think a lot of people feel this way.
@laszlo3547
@laszlo3547 2 жыл бұрын
So the takeaway: -VBA is too important/useful it is staying indefinitely. -Office scripts sacrifices vital core functionality such as multiple workbook use and events, while offering very minor benefits (works in a browser). It's also arguably harder to read.
@top10ofanything51
@top10ofanything51 Жыл бұрын
For home users or people with E3 license, this seems like a disadvantage but there are millions of employee around the world who only has an E1 access. These people can only use their browser and for them, this is a game changer.
@mayursoftwarewala3316
@mayursoftwarewala3316 3 жыл бұрын
Thank you very much for sharing most important knowledge, Here is Mayur (VBA developer since : 2005 )
@Excelmacromastery
@Excelmacromastery 3 жыл бұрын
You're welcome!
@big1975E
@big1975E 3 жыл бұрын
Great video! It’s good to know the future of VBA. Have you heard anything about Microsoft possible integrating Python into Excel? I would love to see some videos or webinars about OfficeScript and how to use it in conjunction with VBA.
@Excelmacromastery
@Excelmacromastery 3 жыл бұрын
Python works with Power BI and the founder of Python now works with Microsoft. That's all I know:-)
@TP-om8of
@TP-om8of 3 жыл бұрын
@@Excelmacromastery with Mr Python working for MS, maybe it’s time to switch to Julia.
@richardbaron7106
@richardbaron7106 9 ай бұрын
Two years later and the SecOps team in my organization rolled out a large Windows and security update, with the net result being that opening a macro-enable Excel sheet invariably causes Excel to crash a couple of times before it loads in Safe mode. At this point, I can run the VBA macro, but, this is no good if I'm using a Power Automate Desktop flow to run the VBA code, because Excel crashes. Weirdly, if I use an Excel control sheet with nothing in the sheet, but code underneath that recalls various sheets to do things, Excel doesn't freak out. I've just replaced the VBA code with an Office Scripts code and yes, it now works with a least one other open workbook and it works on the desktop versions of Excel (if you have Office 365). You can even save the Office Script to the worksheet, where it creates a button to click on. However, Power Automate Desktop doesn't have the ability to trigger an Office Script directly, like it does with VBA, so the work around is to use "click a button in the Window" command in the flow and select the button via the UI tool. I suspect adding Office Scripts functionality in PAD is going to be a premium service in the future. Caveat: when I say I replaced the VBA code with Office Scripts, it's not a complete code-for-script replacement - at least not yet. Because I had to do it fairly quickly, I also used SendKeys commands in PAD to filter the other sheet, navigate to specific cells etc. The flow itself works well and is reasonably quick, especially as it is downloading source data, saving it to a specific location, renaming the files, then adding a date suffix at the end, before sending a message to a Teams channel as well. PS: don't ask free ChatGPT 3.5 to figure out your Office Scripts code or PAD flows - it gets the Office Scripts code wrong and gives you PA cloud flows instead. I'm too cheap to upgrade to ChatGPT 4 😂
@sparky191
@sparky191 3 жыл бұрын
Most of my vba has been automating multiple different files and often between different applications using the different object models. Often with lots of userforms. I just don't see anything that as easy to do this as vba.
@sparky191
@sparky191 3 жыл бұрын
Things like office script, power automate, Are very disjointed and sprawling from the pov of deploying and maintaining solutions. They are Frankenstein like solutions.
@mching4473
@mching4473 3 жыл бұрын
Doesn't matter if it is VBA, Powershell, C#, Python... so long as it is not an RPA solution 😁
@Excelmacromastery
@Excelmacromastery 3 жыл бұрын
😄😄
@thearchibaldtuttle
@thearchibaldtuttle 3 жыл бұрын
It's a new tool in the toolbox. Not every Excel workbook that requires coding has to work in the cloud but it is great to have the possibilities now!
@Excelmacromastery
@Excelmacromastery 3 жыл бұрын
That's very true.
@tuyoexcelypowerbi
@tuyoexcelypowerbi 3 жыл бұрын
Events can be programmed if you do it with the Office Javascript API. I did it with Script Lab or VSC, I do not know why Office Scripts does not allow it. Just yo say that Office Scripts is one of many ways to develop Javascript/TypeScript for Excel
@Excelmacromastery
@Excelmacromastery 3 жыл бұрын
The reason events don't work is because Office Scripts are synchronous where as the javascript API is Asynchronous. "The Office Scripts APIs are an optimized, synchronous subset of the Excel JavaScript API model."
@tuyoexcelypowerbi
@tuyoexcelypowerbi 3 жыл бұрын
@@Excelmacromastery I recommend you to use Script Lab where you can do it, also you can programe HTML and CSS, also JS / TS and its free
@tuyoexcelypowerbi
@tuyoexcelypowerbi 3 жыл бұрын
@@Excelmacromastery Too many diferent ways to programme JS-TS for Excel. I think Microsoft is not doing it well prommoting this as for VBA coders is not easy to start.
@steveipsen6293
@steveipsen6293 3 жыл бұрын
Why not allow Python as a programming platform for all the flavors of Office? It is popular, and I have seen at least one video where it made Excel programming much simpler.
@Excelmacromastery
@Excelmacromastery 3 жыл бұрын
Python is hugely popular for sure. The reason for JavaScript/Typescript was to have a language that runs independently of the platform.
@mching4473
@mching4473 3 жыл бұрын
JavaScript is a language already available in all browsers and Microsoft owns Typescript. The inventor of Python, Guido, works at Microsoft at the moment. He was given an opportunity to choose any project he likes and he chose to create a team which would focus on CPython optimizations. The closest we have would probably come from C# (VB's chad twin brother). Although solutions like pyxll exists, I am having a hard time imagining a world where Office is shipped with a bundled Python interpreter.
@MarceloNogueiraGoogle
@MarceloNogueiraGoogle 3 жыл бұрын
In other words, you can build an entire multiuser enterprise application with VBA, but not with Office Scripts. But…. If Office scripts had events, userforms and access to Windows APIs, it would be perfect and I would gladly switch. (Owner of an Excel Application Development company since 2010 and developer since 1999)
@Excelmacromastery
@Excelmacromastery 3 жыл бұрын
Exactly Macelo.
@mileswilliams527
@mileswilliams527 3 жыл бұрын
You have a company that is dedicated to Excel Application Dev? I didn't realise there was enough of a demand. I really wish there was much more of a demand though, enough for MS to actually care about VBA and provide people like us with decent tools that aren't from the last millennium (literally). I love VBA, and I still use it rather frequently despite being an "actual programmer" who uses languages that have modern tooling available for them. Sometimes it's just easier to bang something together in Excel or Access with VBA, and sometimes I just don't want to have to deal with Interop and COM, Marshalling, and being careful to clean up when finished with objects, as you do when working with something like C# and the Office.Interop libraries. And besides, VBA isn't just for Office, I have a few VBA Applications I've built that are still in use that automate CorelDRAW, Solidworks, and AutoCAD, while also pulling data from multiple locations including plain old CSV files, Text files, Excel spreadsheets, Access and MYSQL DB's, and even an old AS400 system in a few cases. You just can't do that kind of stuff with Office Scripts. Can you at least do file system stuff with it? Just simple things like iterating through directory contents, creating new directory structures and populating them with files, reading from files, writing to files, what about opening a shell and executing a binary? I doubt that's possible considering it is an online tool. And how does it not have events? No ActiveX components? How are buttons and other components handled? Now I'm really confused..
@MarceloNogueiraGoogle
@MarceloNogueiraGoogle 3 жыл бұрын
@@mileswilliams527 yes, i do own an Excel VBA app dev company, and for 10 years now clarian.com.br. I am in Brazil. VBA allows you to do literally anything, mainly when using Class Modules. We have done more than 200 projects for fortune 500 companies. We use Excel just as a Client, with all data stored in a SQL Server or any other DB. Excel is extremelly powerful as a Client. It is like using Excel instead of a browser. We have huge systems running for over 5 years with 5000 concurrent users. Over the years we’ve built our own VBA framework which makes it easy to create large Systems, with proper authentication, access control, protection, etc.
@harryriley2696
@harryriley2696 Жыл бұрын
@@MarceloNogueiraGoogle Wow I am just seeing this in 2023 and I am blown away by what VBA can do. So you are saying office scripts aren't really needed if you understand VBA?
@wayneedmondson1065
@wayneedmondson1065 3 жыл бұрын
Thanks Paul. Always great to hear your insights :)) Thumbs up!!
@ethylhexyphthalate
@ethylhexyphthalate 3 жыл бұрын
Thanks for this video! All the other videos I'd seen on this topic either weren't clear as to the differences between VBA and TypeScript or just seemed to be offering opinions.
@Excelmacromastery
@Excelmacromastery 3 жыл бұрын
Glad you like it.
@MrPumaralant
@MrPumaralant 3 жыл бұрын
The reason why microsoft couldnt use VBA on sharepoint is beyond me. Now I have to spend weekends searching for some demo and tutorials just to be up to speed to finalize some projects. As if VBA wasnt broken enough, this office scripts look like broken too. aren't we fucking blessed
@TP-om8of
@TP-om8of 3 жыл бұрын
Have you tried emailing Bill Gates about this? I’m sure he’d be most responsive.
@MrPumaralant
@MrPumaralant 3 жыл бұрын
@@TP-om8of nah he's too busy with his divorce.
@eltonm.t.873
@eltonm.t.873 2 жыл бұрын
I think Microsoft ripped event triggering from Office Script to do away with server overload, anyone could setup applications, solutions or services based on many events that could potentially overload MS Office servers.
@granand
@granand 3 жыл бұрын
So what is the conclusion, I need to learn Java script ? Or JavaScript, Typescript & office script ? Please can someone clarify ..Also when will the switch over happens where excel can be programmed with JavaScript or office scripts
@gajtguyPA
@gajtguyPA Жыл бұрын
At 6mins you showed a comment that mentions 'addins', but I don't see any videos in your channel talking about them. I'm curious if instead of going from VBA for applications to scripts, whether we should start looking to develop addins for Office online instead?
@cobbarne
@cobbarne 3 жыл бұрын
The point about scripts not being event-driven…my understanding from the video is that worksheet buttons won’t be linkable to scripts, but what about custom task panes in an office add-in? And, scripts allow for any sort of web page to be displayed as an overlay…does this mean we need to rethink how we create interfaces, but we can still build complex app inside Excel using office scripts? Thanks!
@a46xyonix
@a46xyonix 2 жыл бұрын
The simple lack of ability to access other workbooks is a complete deal breaker for me. It's too bad, because if it had that I could see myself making the switch.
@rahul7rock
@rahul7rock 3 жыл бұрын
I feel VBA is good at its place. About office scripts, I think more improvements needed. At the moment Google App Scripts are much better than office scripts (personal experience, I may be wrong)
@Excelmacromastery
@Excelmacromastery 3 жыл бұрын
I haven't used Google Scripts but the seem popular.
@mayankhb
@mayankhb 3 жыл бұрын
Yes, I have started learning office scripts and power automate to use it in my workflow
@Sean_Yemen
@Sean_Yemen 3 жыл бұрын
I am a novice VBA user in Excel. I have many automation covered with a VBA code. My question - migration to Excel 365, will I loose my automation code in VBA? Would it be better to remain with pc based Office? Thank you. Am looking forward to any response. Blessings🙏🙏
@Excelmacromastery
@Excelmacromastery 3 жыл бұрын
Hi Sean, This actually causes a lot of confusion for many people. Office 365 contains the desktop version of the Office Applications like Word, Excel. The difference with Office 365 is that it gets regular updates and is subscription based. You can still use Excel and VBA as normal.
@martinruegg9367
@martinruegg9367 3 жыл бұрын
In our company we prefer to use the standard excel, not the online. I doubt if the online version with Office Script will largely replace the standard excel with vba in the (large) corporate world. In that sense, Excel with VBA will still long be used. Taken into account, that VBA will still long time be used, Microsoft could at least enhance the VB-Editor with the same features like in Office Scripts-editor. In VBA are things which I adore like the "with" - Statement, which saves me repeating the object-name. Whereas the object oriented programming in VBA is not quite elegant.
@Excelmacromastery
@Excelmacromastery 3 жыл бұрын
I agree. The desktop will be around for a while yet.
@kusubos
@kusubos 3 жыл бұрын
VBA will be around longer than the tech companies would like to. The switching costs at the companies are just too big. There are millions of small scripts in the companies and people with VBA skills that can't be retrained easily.
@Excelmacromastery
@Excelmacromastery 3 жыл бұрын
Very true.
@marlysbaldezamo2531
@marlysbaldezamo2531 2 жыл бұрын
Why microsoft did not upgrade VBA?
@donasolliro6644
@donasolliro6644 3 жыл бұрын
But we cannot use a shape as a button to trigger a script..
@vvaassaanntthh
@vvaassaanntthh Жыл бұрын
Hello, I found your video useful. I do need one help though I have a requirement whereby I need to use Power Automate (web version) to automatically trigger some macros present in an excel file everyday (that resides in SharePoint). I am stuck and unable to find any useful resources that explain how to do this. Can you please advice?
@johningham1880
@johningham1880 3 жыл бұрын
So can I use a change event in a short VBA script to run an office script (I know that this might seem odd, but I can only use excel on Mac and online at present - I have no access to a PC, so I cannot use all of the features to write a VBA script, specifically user forms)
@internationalpolitics1275
@internationalpolitics1275 Жыл бұрын
'Record action' option not available in my excel automate group. Any help
@KT-zh9xg
@KT-zh9xg 3 жыл бұрын
Thanks for this excellent clip, very insightful
@michelelomonaco5118
@michelelomonaco5118 2 жыл бұрын
Good morning is it possible to run a typescript script when opening an excel file in Teams ? Thank you.
@johnwayne8059
@johnwayne8059 3 жыл бұрын
In typescript for vs2019 it's allowed to define your own events! Does it really not work in office script? That's not so comfortable! Nice Video Paul!👍👍👍🤟😎
@Excelmacromastery
@Excelmacromastery 3 жыл бұрын
Thanks John. The reason events don't work is because Office Scripts are synchronous. "The Office Scripts APIs are an optimized, synchronous subset of the Excel JavaScript API model."
@chandranshpandey1929
@chandranshpandey1929 2 жыл бұрын
but i got to hear from official microsoft people that microsoft ending suppport for VBA
@susank6122
@susank6122 2 жыл бұрын
I am new to VBA. My job is moving me to Office 365. Can someone please tell me if you can use VBA with Excel 365? I cannot seem to get a clear answer anywhere.
@Dan_Therapist
@Dan_Therapist Жыл бұрын
You can. Office 365 comes with a desktop version. The only difference is you get regular updates and it's on a subscription model since everyone's nan and their cat is obsessed with SAAS
@HarmSalomons
@HarmSalomons 3 жыл бұрын
I have Webstorm, will that be able to debug the scripts?
@granand
@granand 3 жыл бұрын
I think in future they will just kill desktop excel maybe
@EngineerK
@EngineerK Жыл бұрын
Add in mobile support and the whole platform becomes increasingly more undesirable from a development point of view
@ahndeux
@ahndeux 2 жыл бұрын
You need to clarify that VBA be used in web applications, but it does not mean VBA can't be used "online". You can use VBA to fetch data from web pages and other online sources just fine. You are just not going to code VBA directly in HTML files like javascript.
@UltimateBargains
@UltimateBargains Жыл бұрын
Power Automate is very buggy.
@rjaquaponics9266
@rjaquaponics9266 2 жыл бұрын
Subscription based anything will die before VBA expires. It's like charging for breathing while you're sitting at your computer or not! Greed never wins!
@jalilabbasi7254
@jalilabbasi7254 3 жыл бұрын
Thanks
@nodrogMelb
@nodrogMelb 2 ай бұрын
"VBA will be around until you retire.." So I've got another 15 years of this... I'm groaning...
@jaspermay5813
@jaspermay5813 Жыл бұрын
Relice?
@vhphan19
@vhphan19 2 жыл бұрын
But seriously, they really need to do something about the f***ing code editor. It's 2022 and it is exactly the same f***ing editor since the 90's!( or 80s??)
@wxl6039
@wxl6039 3 жыл бұрын
Empressed by your slides.
@wxl6039
@wxl6039 3 жыл бұрын
so elegant
@Excelmacromastery
@Excelmacromastery 3 жыл бұрын
Thanks! Glad you like them.
@bogdanexit1
@bogdanexit1 3 жыл бұрын
A good ideea is to make it work with desktop versions
@Excelmacromastery
@Excelmacromastery 3 жыл бұрын
They are working on the Office Scripts desktop version now.
@UltimateBargains
@UltimateBargains Жыл бұрын
I am not a bleeding edge developer, so I am staying with VBA.
@hoges510
@hoges510 2 жыл бұрын
VBA will hang on for a while, but it is inevitable Im afraid. If it doesnt work online line then its going to be a dead donkey.
@eltonm.t.873
@eltonm.t.873 2 жыл бұрын
I'd rather go to Python than Office Script. Office Script actually tries to emulate what Pyhon does through its powerful libraries to manipulate Excel. Although Office Script is a native Microsoft solution and aims the whole MS Office lineup, I don't like the way they try to steer people into thinking the way Microsoft thinks as the best solution. They're doing what Google has already done, binding everyone to their ecosystems!
@eltonm.t.873
@eltonm.t.873 2 жыл бұрын
*Since I found Python I divorced VBA, married Python and never looked back! Well, occasionally I drop by for a night together to remember old times! Python is not jealous!*
@Excelmacromastery
@Excelmacromastery 2 жыл бұрын
😄
@garylhaas2005
@garylhaas2005 3 жыл бұрын
👍👍👌
@yhamainjohn4157
@yhamainjohn4157 3 жыл бұрын
Yes ! VBA won't die ...
Will Python Kill Excel VBA?
12:39
Excel Macro Mastery
Рет қаралды 339 М.
Excel VBA: The Little-known secrets of ByVal and ByRef
13:00
Excel Macro Mastery
Рет қаралды 46 М.
Ozoda - Lada ( Official Music Video 2024 )
06:07
Ozoda
Рет қаралды 21 МЛН
РОДИТЕЛИ НА ШКОЛЬНОМ ПРАЗДНИКЕ
01:00
SIDELNIKOVVV
Рет қаралды 3,4 МЛН
How to use Custom Types To Write Ultra Fast VBA code
12:51
Excel Macro Mastery
Рет қаралды 31 М.
Class Modules in VBA: Made Super Simple
17:43
Excel Macro Mastery
Рет қаралды 33 М.
Do You Need to SWITCH from Excel VBA Macros to Office Scripts?
13:02
Leila Gharani
Рет қаралды 381 М.
How to automate Excel with reusable Office Scripts | Excel Off The Grid
13:54
How to use Class Modules with the VBA Dictionary
14:30
Excel Macro Mastery
Рет қаралды 51 М.
Office Scripts vs Excel VBA (Everything you need to know)
25:08
Excel Macro Mastery
Рет қаралды 74 М.
How to get the Last Row in VBA(The Right Way!)
15:41
Excel Macro Mastery
Рет қаралды 160 М.