Visual Basic for mAsochists (VBA)
-
Now before I start this rant, I mean no insult to any VBA programmers out there reading this. I could not have greater admiration for you for succeeding where I have failed in actually accomplishing anything in VBA for Excel without lines and lines of hacks and botched, messy code. I want to get the general consensus on this, as it has been bugging me no end. My first gripe is that the VBA programming environment that comes with Office (2007) is to my eyes just utter tat. It is currently removing and inserting random whitespace here there and everywhere in what seems to be an overtly malicious attempt to mess with my head. The 'intellisense' and 'syntax highlighting' leave much to be desired, but I could whine about that all day, so I'll stop there. In my opinion however, the absolute worst thing about the VBA editor that shipped with Excel 2007 is... The environment alerts you to coding errors with - get this - a MODAL messagebox that totally interrupts what you're trying to accomplish by screaming in your face until you click the stupid 'OK' button. Secondly it seems to be to be impossible, or at least highly impractical, to accomplish anything approaching an elegant solution to a problem using VBA in Excel. So far this project, I have been repeatedly flummoxed by the arcane, esoteric knowledge of all the peculiarities of VBA that seems to be required to do anything at all in the language with any degree of efficiency. While I am far from being a VB guru, VB.NET is my main programming language alongside Java and also my main source of income. I was astonished to find that my half a decade of VB.NET experience did not help one jot with VBA. Is this just me? Please tell me, because I'm not sure if the problem is on my end (very possible) or with whichever dark ritual was used to create this 'programming language' in the first place.
A programming language is to a programmer what a fine hat is to one who is fond of fancy garden parties. Just don't try wearing any .NET language on your head. Some of them are sharp.
-
Now before I start this rant, I mean no insult to any VBA programmers out there reading this. I could not have greater admiration for you for succeeding where I have failed in actually accomplishing anything in VBA for Excel without lines and lines of hacks and botched, messy code. I want to get the general consensus on this, as it has been bugging me no end. My first gripe is that the VBA programming environment that comes with Office (2007) is to my eyes just utter tat. It is currently removing and inserting random whitespace here there and everywhere in what seems to be an overtly malicious attempt to mess with my head. The 'intellisense' and 'syntax highlighting' leave much to be desired, but I could whine about that all day, so I'll stop there. In my opinion however, the absolute worst thing about the VBA editor that shipped with Excel 2007 is... The environment alerts you to coding errors with - get this - a MODAL messagebox that totally interrupts what you're trying to accomplish by screaming in your face until you click the stupid 'OK' button. Secondly it seems to be to be impossible, or at least highly impractical, to accomplish anything approaching an elegant solution to a problem using VBA in Excel. So far this project, I have been repeatedly flummoxed by the arcane, esoteric knowledge of all the peculiarities of VBA that seems to be required to do anything at all in the language with any degree of efficiency. While I am far from being a VB guru, VB.NET is my main programming language alongside Java and also my main source of income. I was astonished to find that my half a decade of VB.NET experience did not help one jot with VBA. Is this just me? Please tell me, because I'm not sure if the problem is on my end (very possible) or with whichever dark ritual was used to create this 'programming language' in the first place.
A programming language is to a programmer what a fine hat is to one who is fond of fancy garden parties. Just don't try wearing any .NET language on your head. Some of them are sharp.
-
Now before I start this rant, I mean no insult to any VBA programmers out there reading this. I could not have greater admiration for you for succeeding where I have failed in actually accomplishing anything in VBA for Excel without lines and lines of hacks and botched, messy code. I want to get the general consensus on this, as it has been bugging me no end. My first gripe is that the VBA programming environment that comes with Office (2007) is to my eyes just utter tat. It is currently removing and inserting random whitespace here there and everywhere in what seems to be an overtly malicious attempt to mess with my head. The 'intellisense' and 'syntax highlighting' leave much to be desired, but I could whine about that all day, so I'll stop there. In my opinion however, the absolute worst thing about the VBA editor that shipped with Excel 2007 is... The environment alerts you to coding errors with - get this - a MODAL messagebox that totally interrupts what you're trying to accomplish by screaming in your face until you click the stupid 'OK' button. Secondly it seems to be to be impossible, or at least highly impractical, to accomplish anything approaching an elegant solution to a problem using VBA in Excel. So far this project, I have been repeatedly flummoxed by the arcane, esoteric knowledge of all the peculiarities of VBA that seems to be required to do anything at all in the language with any degree of efficiency. While I am far from being a VB guru, VB.NET is my main programming language alongside Java and also my main source of income. I was astonished to find that my half a decade of VB.NET experience did not help one jot with VBA. Is this just me? Please tell me, because I'm not sure if the problem is on my end (very possible) or with whichever dark ritual was used to create this 'programming language' in the first place.
A programming language is to a programmer what a fine hat is to one who is fond of fancy garden parties. Just don't try wearing any .NET language on your head. Some of them are sharp.
It's not just you. :beer:
SixOfTheClock wrote:
a MODAL messagebox
Yes, that is the VERY worst thing about VBA and it's been like that for decades. My only solace when I had to do VB.net was that VS doesn't do that. As to the rest, yes, finding out how to do anything is very difficult.
-
Now before I start this rant, I mean no insult to any VBA programmers out there reading this. I could not have greater admiration for you for succeeding where I have failed in actually accomplishing anything in VBA for Excel without lines and lines of hacks and botched, messy code. I want to get the general consensus on this, as it has been bugging me no end. My first gripe is that the VBA programming environment that comes with Office (2007) is to my eyes just utter tat. It is currently removing and inserting random whitespace here there and everywhere in what seems to be an overtly malicious attempt to mess with my head. The 'intellisense' and 'syntax highlighting' leave much to be desired, but I could whine about that all day, so I'll stop there. In my opinion however, the absolute worst thing about the VBA editor that shipped with Excel 2007 is... The environment alerts you to coding errors with - get this - a MODAL messagebox that totally interrupts what you're trying to accomplish by screaming in your face until you click the stupid 'OK' button. Secondly it seems to be to be impossible, or at least highly impractical, to accomplish anything approaching an elegant solution to a problem using VBA in Excel. So far this project, I have been repeatedly flummoxed by the arcane, esoteric knowledge of all the peculiarities of VBA that seems to be required to do anything at all in the language with any degree of efficiency. While I am far from being a VB guru, VB.NET is my main programming language alongside Java and also my main source of income. I was astonished to find that my half a decade of VB.NET experience did not help one jot with VBA. Is this just me? Please tell me, because I'm not sure if the problem is on my end (very possible) or with whichever dark ritual was used to create this 'programming language' in the first place.
A programming language is to a programmer what a fine hat is to one who is fond of fancy garden parties. Just don't try wearing any .NET language on your head. Some of them are sharp.
this "language" as you call it is a spin off of vb6, the development environment is VB6, and the dark ritual was probably the same that got adam and eve out of the paradise in the first place...
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)
-
this "language" as you call it is a spin off of vb6, the development environment is VB6, and the dark ritual was probably the same that got adam and eve out of the paradise in the first place...
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)
You're saying that VB6 was an Apple product? :confused: :jig:
-
The vba environment is vb6. The visual studio IDE for fb6 was exactly the same way. Horrible. Whenever possible, use .Net and/or Java to program for excel.
If it moves, compile it
-
You're saying that VB6 was an Apple product? :confused: :jig:
-
Now before I start this rant, I mean no insult to any VBA programmers out there reading this. I could not have greater admiration for you for succeeding where I have failed in actually accomplishing anything in VBA for Excel without lines and lines of hacks and botched, messy code. I want to get the general consensus on this, as it has been bugging me no end. My first gripe is that the VBA programming environment that comes with Office (2007) is to my eyes just utter tat. It is currently removing and inserting random whitespace here there and everywhere in what seems to be an overtly malicious attempt to mess with my head. The 'intellisense' and 'syntax highlighting' leave much to be desired, but I could whine about that all day, so I'll stop there. In my opinion however, the absolute worst thing about the VBA editor that shipped with Excel 2007 is... The environment alerts you to coding errors with - get this - a MODAL messagebox that totally interrupts what you're trying to accomplish by screaming in your face until you click the stupid 'OK' button. Secondly it seems to be to be impossible, or at least highly impractical, to accomplish anything approaching an elegant solution to a problem using VBA in Excel. So far this project, I have been repeatedly flummoxed by the arcane, esoteric knowledge of all the peculiarities of VBA that seems to be required to do anything at all in the language with any degree of efficiency. While I am far from being a VB guru, VB.NET is my main programming language alongside Java and also my main source of income. I was astonished to find that my half a decade of VB.NET experience did not help one jot with VBA. Is this just me? Please tell me, because I'm not sure if the problem is on my end (very possible) or with whichever dark ritual was used to create this 'programming language' in the first place.
A programming language is to a programmer what a fine hat is to one who is fond of fancy garden parties. Just don't try wearing any .NET language on your head. Some of them are sharp.
-
Now before I start this rant, I mean no insult to any VBA programmers out there reading this. I could not have greater admiration for you for succeeding where I have failed in actually accomplishing anything in VBA for Excel without lines and lines of hacks and botched, messy code. I want to get the general consensus on this, as it has been bugging me no end. My first gripe is that the VBA programming environment that comes with Office (2007) is to my eyes just utter tat. It is currently removing and inserting random whitespace here there and everywhere in what seems to be an overtly malicious attempt to mess with my head. The 'intellisense' and 'syntax highlighting' leave much to be desired, but I could whine about that all day, so I'll stop there. In my opinion however, the absolute worst thing about the VBA editor that shipped with Excel 2007 is... The environment alerts you to coding errors with - get this - a MODAL messagebox that totally interrupts what you're trying to accomplish by screaming in your face until you click the stupid 'OK' button. Secondly it seems to be to be impossible, or at least highly impractical, to accomplish anything approaching an elegant solution to a problem using VBA in Excel. So far this project, I have been repeatedly flummoxed by the arcane, esoteric knowledge of all the peculiarities of VBA that seems to be required to do anything at all in the language with any degree of efficiency. While I am far from being a VB guru, VB.NET is my main programming language alongside Java and also my main source of income. I was astonished to find that my half a decade of VB.NET experience did not help one jot with VBA. Is this just me? Please tell me, because I'm not sure if the problem is on my end (very possible) or with whichever dark ritual was used to create this 'programming language' in the first place.
A programming language is to a programmer what a fine hat is to one who is fond of fancy garden parties. Just don't try wearing any .NET language on your head. Some of them are sharp.
Just look at what you had before VBA. It was so much worse.
-
You, my friend, are amazing. :) Thanks!
A programming language is to a programmer what a fine hat is to one who is fond of fancy garden parties. Just don't try wearing any .NET language on your head. Some of them are sharp.
-
Now before I start this rant, I mean no insult to any VBA programmers out there reading this. I could not have greater admiration for you for succeeding where I have failed in actually accomplishing anything in VBA for Excel without lines and lines of hacks and botched, messy code. I want to get the general consensus on this, as it has been bugging me no end. My first gripe is that the VBA programming environment that comes with Office (2007) is to my eyes just utter tat. It is currently removing and inserting random whitespace here there and everywhere in what seems to be an overtly malicious attempt to mess with my head. The 'intellisense' and 'syntax highlighting' leave much to be desired, but I could whine about that all day, so I'll stop there. In my opinion however, the absolute worst thing about the VBA editor that shipped with Excel 2007 is... The environment alerts you to coding errors with - get this - a MODAL messagebox that totally interrupts what you're trying to accomplish by screaming in your face until you click the stupid 'OK' button. Secondly it seems to be to be impossible, or at least highly impractical, to accomplish anything approaching an elegant solution to a problem using VBA in Excel. So far this project, I have been repeatedly flummoxed by the arcane, esoteric knowledge of all the peculiarities of VBA that seems to be required to do anything at all in the language with any degree of efficiency. While I am far from being a VB guru, VB.NET is my main programming language alongside Java and also my main source of income. I was astonished to find that my half a decade of VB.NET experience did not help one jot with VBA. Is this just me? Please tell me, because I'm not sure if the problem is on my end (very possible) or with whichever dark ritual was used to create this 'programming language' in the first place.
A programming language is to a programmer what a fine hat is to one who is fond of fancy garden parties. Just don't try wearing any .NET language on your head. Some of them are sharp.
VBA: But more informatively, Excel spreadsheet. Yes, I too gag at the relationship. However, think about the genesis of it. What's the easiest way to keep track of typed-in data -> the spreadsheet. The origin of which is a peice of paper, a pencil or pen and a cheap calculator. I was thankful for Lotus 1-2-3. And post-wysiwyg scripting. I positively could not wait to go "Visual" with the move to Excel in 2000. All hindsight permutations, without VBA and THE SUBSET I might not have succeeded in excercising VB or VBNET or C++ or ... well not c#, to good effect. It's a language I'd recommend as a stepping stone to others. Especially to children interested in keeping track of accounts.
-
Now before I start this rant, I mean no insult to any VBA programmers out there reading this. I could not have greater admiration for you for succeeding where I have failed in actually accomplishing anything in VBA for Excel without lines and lines of hacks and botched, messy code. I want to get the general consensus on this, as it has been bugging me no end. My first gripe is that the VBA programming environment that comes with Office (2007) is to my eyes just utter tat. It is currently removing and inserting random whitespace here there and everywhere in what seems to be an overtly malicious attempt to mess with my head. The 'intellisense' and 'syntax highlighting' leave much to be desired, but I could whine about that all day, so I'll stop there. In my opinion however, the absolute worst thing about the VBA editor that shipped with Excel 2007 is... The environment alerts you to coding errors with - get this - a MODAL messagebox that totally interrupts what you're trying to accomplish by screaming in your face until you click the stupid 'OK' button. Secondly it seems to be to be impossible, or at least highly impractical, to accomplish anything approaching an elegant solution to a problem using VBA in Excel. So far this project, I have been repeatedly flummoxed by the arcane, esoteric knowledge of all the peculiarities of VBA that seems to be required to do anything at all in the language with any degree of efficiency. While I am far from being a VB guru, VB.NET is my main programming language alongside Java and also my main source of income. I was astonished to find that my half a decade of VB.NET experience did not help one jot with VBA. Is this just me? Please tell me, because I'm not sure if the problem is on my end (very possible) or with whichever dark ritual was used to create this 'programming language' in the first place.
A programming language is to a programmer what a fine hat is to one who is fond of fancy garden parties. Just don't try wearing any .NET language on your head. Some of them are sharp.
If you really want to experience a nightmare, try doing Access VBA development. For some reason, everything seems to devolve into a half-dozen or more top-level windows flying in close formation, each with its own cryptic-looking icon. It's the opposite of an IDE... I guess it's a Dis-integrated Development Environment (DDE).
-
If you really want to experience a nightmare, try doing Access VBA development. For some reason, everything seems to devolve into a half-dozen or more top-level windows flying in close formation, each with its own cryptic-looking icon. It's the opposite of an IDE... I guess it's a Dis-integrated Development Environment (DDE).
:thumbsup:
"I've seen more information on a frickin' sticky note!" - Dave Kreskowiak
-
Now before I start this rant, I mean no insult to any VBA programmers out there reading this. I could not have greater admiration for you for succeeding where I have failed in actually accomplishing anything in VBA for Excel without lines and lines of hacks and botched, messy code. I want to get the general consensus on this, as it has been bugging me no end. My first gripe is that the VBA programming environment that comes with Office (2007) is to my eyes just utter tat. It is currently removing and inserting random whitespace here there and everywhere in what seems to be an overtly malicious attempt to mess with my head. The 'intellisense' and 'syntax highlighting' leave much to be desired, but I could whine about that all day, so I'll stop there. In my opinion however, the absolute worst thing about the VBA editor that shipped with Excel 2007 is... The environment alerts you to coding errors with - get this - a MODAL messagebox that totally interrupts what you're trying to accomplish by screaming in your face until you click the stupid 'OK' button. Secondly it seems to be to be impossible, or at least highly impractical, to accomplish anything approaching an elegant solution to a problem using VBA in Excel. So far this project, I have been repeatedly flummoxed by the arcane, esoteric knowledge of all the peculiarities of VBA that seems to be required to do anything at all in the language with any degree of efficiency. While I am far from being a VB guru, VB.NET is my main programming language alongside Java and also my main source of income. I was astonished to find that my half a decade of VB.NET experience did not help one jot with VBA. Is this just me? Please tell me, because I'm not sure if the problem is on my end (very possible) or with whichever dark ritual was used to create this 'programming language' in the first place.
A programming language is to a programmer what a fine hat is to one who is fond of fancy garden parties. Just don't try wearing any .NET language on your head. Some of them are sharp.
I don't think Microsoft want you to use VBA any more - you can now use .Net to do exactly the same stuff[^]. You still need to know the ghastly innards of Office COM automation but it should be that little less frustrating. Jake Ginnivan also has a pretty nice library[^] that should help you with your COM headaches. Also remember, if you want to distribute your spreadsheet, that VBA is now an optional installation component (turned off by default from what I remember), where VSTO is always installed (from what I remember :D). It is putrid though, if you want worse try writing extensive Visual Studio plugins (project systems, debuggers, etc.).
He who asks a question is a fool for five minutes. He who does not ask a question remains a fool forever. [Chinese Proverb] Jonathan C Dickinson (C# Software Engineer)
-
Now before I start this rant, I mean no insult to any VBA programmers out there reading this. I could not have greater admiration for you for succeeding where I have failed in actually accomplishing anything in VBA for Excel without lines and lines of hacks and botched, messy code. I want to get the general consensus on this, as it has been bugging me no end. My first gripe is that the VBA programming environment that comes with Office (2007) is to my eyes just utter tat. It is currently removing and inserting random whitespace here there and everywhere in what seems to be an overtly malicious attempt to mess with my head. The 'intellisense' and 'syntax highlighting' leave much to be desired, but I could whine about that all day, so I'll stop there. In my opinion however, the absolute worst thing about the VBA editor that shipped with Excel 2007 is... The environment alerts you to coding errors with - get this - a MODAL messagebox that totally interrupts what you're trying to accomplish by screaming in your face until you click the stupid 'OK' button. Secondly it seems to be to be impossible, or at least highly impractical, to accomplish anything approaching an elegant solution to a problem using VBA in Excel. So far this project, I have been repeatedly flummoxed by the arcane, esoteric knowledge of all the peculiarities of VBA that seems to be required to do anything at all in the language with any degree of efficiency. While I am far from being a VB guru, VB.NET is my main programming language alongside Java and also my main source of income. I was astonished to find that my half a decade of VB.NET experience did not help one jot with VBA. Is this just me? Please tell me, because I'm not sure if the problem is on my end (very possible) or with whichever dark ritual was used to create this 'programming language' in the first place.
A programming language is to a programmer what a fine hat is to one who is fond of fancy garden parties. Just don't try wearing any .NET language on your head. Some of them are sharp.
Ah VBA! I love it, love it, love it! Before you all dismiss me as completely and utterly mad, imagine the scenario ... 1. In the dark and distant past a user discovers Excel macros and starts to "automate" certain daily functions 2. It soon becomes all too much for them to handle so the macros get passed to an "IT contractor" to be brought up to production strength (an oxymoron if ever there was). Note that at this point the IT department still know nothing about this 3. In the meantime these spreadsheets somehow manage to become business critical "applications" 4. Eventually someone in the user department has an epiphany - or it might have been an audit finding - and said piece of s**t is passed over to the IT department to support. 5. By now the business-critical excel "application" consists of more than 120 spreadsheets mashed together like a web built by a hundred drunken spiders 6. Enter yours truly ... the re-engineering of various parts of this mess (when allowed to by the red-tape afficiandos) has kept me in gainful employment for some considerable time!! :-D p.s. around here "VBA" is known as "Visual Basic for Amateurs"
-
Now before I start this rant, I mean no insult to any VBA programmers out there reading this. I could not have greater admiration for you for succeeding where I have failed in actually accomplishing anything in VBA for Excel without lines and lines of hacks and botched, messy code. I want to get the general consensus on this, as it has been bugging me no end. My first gripe is that the VBA programming environment that comes with Office (2007) is to my eyes just utter tat. It is currently removing and inserting random whitespace here there and everywhere in what seems to be an overtly malicious attempt to mess with my head. The 'intellisense' and 'syntax highlighting' leave much to be desired, but I could whine about that all day, so I'll stop there. In my opinion however, the absolute worst thing about the VBA editor that shipped with Excel 2007 is... The environment alerts you to coding errors with - get this - a MODAL messagebox that totally interrupts what you're trying to accomplish by screaming in your face until you click the stupid 'OK' button. Secondly it seems to be to be impossible, or at least highly impractical, to accomplish anything approaching an elegant solution to a problem using VBA in Excel. So far this project, I have been repeatedly flummoxed by the arcane, esoteric knowledge of all the peculiarities of VBA that seems to be required to do anything at all in the language with any degree of efficiency. While I am far from being a VB guru, VB.NET is my main programming language alongside Java and also my main source of income. I was astonished to find that my half a decade of VB.NET experience did not help one jot with VBA. Is this just me? Please tell me, because I'm not sure if the problem is on my end (very possible) or with whichever dark ritual was used to create this 'programming language' in the first place.
A programming language is to a programmer what a fine hat is to one who is fond of fancy garden parties. Just don't try wearing any .NET language on your head. Some of them are sharp.
Are you using VBA with Macintosh Excel 2011 / OSX because you need your whatever to run on a Macintosh, as well as Windows: if that's the case, then there's not much you can do, since VSTO is out. I think you are making the assumption that your programming skills in Visual Basic .NET should have "payback" in using the "original" VBA: that's an assumption I question. I do think your investment in Visual Basic .Net should have payback in using VSTO in Excel for Windows. Experience in programming pre-.NET versions of VB, on the other hand, was of value in programming VBA when it first appeared. When VBA arrived (in the late neolithic ... circa 1995 ... the time of Windows 95, and Excel 95), it replaced the incredibly clumsy "macro" facility. It gave VB programmers of that time a way to use what they knew. And, yes, if you wrote linguini-code in VB, you would probably write fettucine-code in VBA :) People (like this flea currently writing here) got major work, back then, replacing per-project custom-macro consultants, whose work could not be re-used: replacing one-off inscrutable Macro sheets with generic VBA solutions, which could be re-used: even maintained without re-hiring the original macro consultant ! So, circa 1995, I did a 6000 lines of VBA (plus about 2000 lines of comments) custom application for a major world energy company that modeled the very complex financing of the construction period for energy-plants that had many lenders, of many types (international export-import banks run by national governments, host-country investment, private banks, etc.). Each lender might have different constraints for use of funds, and different methods of calculating payment of interest for their share of monetary contribution (on both funds already spent, and funds not yet spent) during each phase of the construction period. Expenditures per month of construction period were based on a primary-contractor supplied set of data, the "S-Curve", that told you what percentage of the actual construction cost was required to be drawn-down for each month. So, the calculation of the true cost of the project for each month of construction (actual construction cost + all interest costs) required recursive manipulation to determine (via Excel's "Solver" facility). Not simple stuff ! This Excel-application could run on either PC or Macintosh hardware (of that time), with the only platform requirements being taking into account possible screen-size variations. Being able to run on both platforms was, at the time
-
Now before I start this rant, I mean no insult to any VBA programmers out there reading this. I could not have greater admiration for you for succeeding where I have failed in actually accomplishing anything in VBA for Excel without lines and lines of hacks and botched, messy code. I want to get the general consensus on this, as it has been bugging me no end. My first gripe is that the VBA programming environment that comes with Office (2007) is to my eyes just utter tat. It is currently removing and inserting random whitespace here there and everywhere in what seems to be an overtly malicious attempt to mess with my head. The 'intellisense' and 'syntax highlighting' leave much to be desired, but I could whine about that all day, so I'll stop there. In my opinion however, the absolute worst thing about the VBA editor that shipped with Excel 2007 is... The environment alerts you to coding errors with - get this - a MODAL messagebox that totally interrupts what you're trying to accomplish by screaming in your face until you click the stupid 'OK' button. Secondly it seems to be to be impossible, or at least highly impractical, to accomplish anything approaching an elegant solution to a problem using VBA in Excel. So far this project, I have been repeatedly flummoxed by the arcane, esoteric knowledge of all the peculiarities of VBA that seems to be required to do anything at all in the language with any degree of efficiency. While I am far from being a VB guru, VB.NET is my main programming language alongside Java and also my main source of income. I was astonished to find that my half a decade of VB.NET experience did not help one jot with VBA. Is this just me? Please tell me, because I'm not sure if the problem is on my end (very possible) or with whichever dark ritual was used to create this 'programming language' in the first place.
A programming language is to a programmer what a fine hat is to one who is fond of fancy garden parties. Just don't try wearing any .NET language on your head. Some of them are sharp.
As others have said, VBA does pre-date the Visual Studio IDEs, so it's a bit "unfair" to be upset about an IDE that originated almost twenty years ago :-) Compared to what we had to work with prior to that, it was true luxury, whether you worked in Word or Excel. (PowerPoint didn't even have a programming interface, at the time.) And FWIW it's almost as difficult for VBA people moving to VB.NET when it comes to "keeping one's balance". Working in a new IDE is always a challenge because you're on auto-pilot when you go to the tools you use regularly - and they aren't in the same place, are labelled different or look different... Heck, Visual Studio 2012 has changed the icons, labels and placing of so many things it's a pain to work in there after "living" so long in the 2008/2010 IDEs! How different or similar VB.NET and VBA are also depend on whether you use the Microsoft.VisualBasic namespace for functionality, or work with that native to the .NET Framework. The VisualBasic namespace is there to help people migrating from classic VB(A), but if you "do it right", the VB.NET language has very little resemblence to classic VB(A). About the only thing that stays the same - IF you work with Option Strict Off - is its leniency as regards data typing and the general meaning of some keywords and programming structures. Examples: Dim, If...End If, With...End With, Select Case For Each...Next, etc. <> Since you don't give any examples, it's really not possible to give any advice or commiseration on this point. But having worked in VB.NET is no preparation for understanding any non-.NET Framework object model, especially an Office object model. Firstly, they build on COM programming principles and secondly, they revolve completely around the individual Office application and how it was designed. You first need to understand that - and that's just a lot of basic, grunt work. Doesn't matter which programming languages you're experienced in, even VBA, if you have little to no knowledge of Excel (or Word, or PowerPoint, or...) Perhaps if you were to detail what's bothering you, people could offer a bit more substantial assistance than telling you where to change settings in Tools/Options -:)?
-- Cindy Meister
-
Now before I start this rant, I mean no insult to any VBA programmers out there reading this. I could not have greater admiration for you for succeeding where I have failed in actually accomplishing anything in VBA for Excel without lines and lines of hacks and botched, messy code. I want to get the general consensus on this, as it has been bugging me no end. My first gripe is that the VBA programming environment that comes with Office (2007) is to my eyes just utter tat. It is currently removing and inserting random whitespace here there and everywhere in what seems to be an overtly malicious attempt to mess with my head. The 'intellisense' and 'syntax highlighting' leave much to be desired, but I could whine about that all day, so I'll stop there. In my opinion however, the absolute worst thing about the VBA editor that shipped with Excel 2007 is... The environment alerts you to coding errors with - get this - a MODAL messagebox that totally interrupts what you're trying to accomplish by screaming in your face until you click the stupid 'OK' button. Secondly it seems to be to be impossible, or at least highly impractical, to accomplish anything approaching an elegant solution to a problem using VBA in Excel. So far this project, I have been repeatedly flummoxed by the arcane, esoteric knowledge of all the peculiarities of VBA that seems to be required to do anything at all in the language with any degree of efficiency. While I am far from being a VB guru, VB.NET is my main programming language alongside Java and also my main source of income. I was astonished to find that my half a decade of VB.NET experience did not help one jot with VBA. Is this just me? Please tell me, because I'm not sure if the problem is on my end (very possible) or with whichever dark ritual was used to create this 'programming language' in the first place.
A programming language is to a programmer what a fine hat is to one who is fond of fancy garden parties. Just don't try wearing any .NET language on your head. Some of them are sharp.
SixOfTheClock wrote:
whichever dark ritual was used to create this 'programming language'
Awesome!