Microsoft visual basic for excel 2003
VB.NET falls in between the two extremes. C# is the other extreme, you have to be very exact. We know that VBA is very forgiving and does a lot of guess work, allowing "lazy coding". If you pass it Type.Missing, it returns the ChartObjects collection." If you pass it a string that represents the name or a 1-based index, it returns the specified ChartObject. Quoting from the "Erics' book" Visual Studio Tools for Office: "The ChartObjects method also doubles as a way to get to the ChartObjects collection, which can be quite confusing. Turns out that ChartObjects is dual-purpose. But if I can get something to work with C# it will work in VB.NET, it just might turn out to be a bit of "over-kill", so I gave it a whirl. I thought I was opening a VB.NET project, but turned out it was CSharp. OK, found some time to test this (I'm not an Excel specialist, so some of these things are new to me, too). I'd really appreciate any pointers you can offer! I'm sure it's a very basic mistake (no pun intended). Public objVisualiserSheet As Excel.Worksheet ' (this is set to the sheet called " Visualiser", which is sheet1 internally)įor Each chObj In įor Each chObj In ( "Visualiser" ).ChartObjects The For each just stops immediatey I tried a couple of variations but it made no difference at all: The following working snippets from VBA always stops the debugger with no message, and I can't find anything in my books to help:įor Each chObj In objVisualiserSheet.ChartObjects of charts that I initially produced manually in the workbook.
#MICROSOFT VISUAL BASIC FOR EXCEL 2003 CODE#
I've hit a total road block with the code that I use to set the position, visibility, etc. I've removed all the errors and warnings. So far I've got my basic application running to the stage where it shows all my custom menus, I can use the menus, and it displays the 8 major charts that form the basis of the system, and it runs through about 8,000 llines of code so far. I think I've worked out most of the syntax differences and the basic structure, though it's been more of a trial and error method rather than really understanding the whole thing (I have two books I'm working through).
#MICROSOFT VISUAL BASIC FOR EXCEL 2003 HOW TO#
I'm a VBA Excel (2003, professional) developer with an application (15,000 lines of code, 80 sheets, 40 forms) that I'm trying to teach myself how to convert to VSTO (using Visual Studio 2005 first edition, with VB).