8 ms·
MS Office stuff. Excel and Outlook use VBS. I've had do some crazy stuff in Outlook with VBS.
by xellisx 8y ago
MS Office stuff. Excel and Outlook use VBS. I've had do some crazy stuff in Outlook with VBS.
- teh_klev 8y agoMinor nitpick. Office embeds VBA (Visual Basic for Applications) which is pretty much Visual Basic 6. You also get the benefits of early binding and strong typing, for example: Function DoSomething(name As String) As String End Function VBS is a different beast. Whilst it shares the more or less the same language keywords and constructs as VB6/VBA (most VB6/VBA code is valid VBS code), it's actually more akin to a dynamically typed language. For example, all variables in VBS are Variants, you can't declare things as explicit types, say strings or integers. If you need to instantiate classes residing in external COM libraries you need to use the CreateObject() built-in and specify that class's "ProgID" e.g. Set thinger = CreateObject("MyLib.Thingy") vs Dim thinger As MyLib.Thingy
- xellisx 8y agoYeah - I got confused on VBA / VBS....
- smhenderson 8y agoI thought that particular flavor was referred to as VBA (Applications). I know Office has exposed it's interface through COM to VBS since at least Office 2000 but I thought internally Office Macros were written in VBA. And I know what you mean, regardless of what flavor it was I've had to some pretty crazy stuff using VB for Access, Excel and Outlook. Once you show something small and helpful to someone you wrote in VB they think they can automate the whole office with it. Sometimes it works, sometimes not but even when it worked it was always kind of brittle and I found myself have to code around a lot of exceptions which was pretty darn tedious. All in all I don't think VB.net is too terrible but I would not be sorry to see a lot of legacy VB just quietly disappear. I feel like in 20 - 30 years though it will be the new COBOL given the amount of internal business systems that were implemented using it in the 90's and 2000's.
- xellisx 8y agoThat would be correct. I got confused.
- smhenderson 8y agoNo worries, it's been a while so I wasn't 100% sure either.