Microsoft reveled this week Visual Studio LightSwitch, which is a rapid application development (RAD) environment for business applications. Or simply a really cool code generator. I think this is a great product idea for a few reasons and mostly because I do RAD or at least try to do RAD business apps.
This is part II of what I’ve done to an Excel spread sheet programmatically…
A few weeks ago I posted how to hide and unhide Excel rows with VB.NET, so now lets help the user by creating a button and having it copy the range of information to be pasted in another document (email, Word, ect..).
This is a really short post because the code is so simple.
First, make a button on the excel page.
Second, use this code to copy a range.
- Private Sub copyButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles copyButton.Click
I have an excel spread sheet that is used for producing sales quotes. Over the last few years it has started being used by other sales reps around my employer and they tend to be older (50+) and not very computer savvy. So this is required me to “make it easier to use” by non-tech people.
There are three major problems I have run into: 1) Hiding or Un-hiding rows dependent upon the number of products quoted. 2) Copying the area to a word document or 3) creating a new outlook email and pasting the excel cells into it. Apparently this can be a bit of voodoo to someone not very used to Excel.
In my first VB.Net application I am essentially making a Return on Investment (ROI) calculator. This provides me several functions to learn from (tab control, text boxes, rich text boxes). It is also math intensive from a lot of values to calculate and will require several “IF” statements and multi-level “IF” statements.
The hardest part has been working with a Chart. Microsoft added charting to .NET 3.5 and it is also available in .NET 4.0. Both frameworks have it for forms and ASP.NET. You have to download the MSChart.exe for .NET 3.5 and the MSChart Visual Studio 2008 add-in (built into VS2010). Follow the links at http://code.msdn.microsoft.com/mschart for a good set of installation instructions.
I have been working on several basic projects in Visual Basic.NET since taking my class. All have a requirement for user information such as Name, Address, State, Phone Number, Zip Code, Email, ect… One of my forms requires a minimum of 3 places to put the State in. Since I want the state information to be a constant format I need combo boxes. I figured there had to be an easier way or .NET function for the lists of US states. Apparently there is not a simple .NET function for this, so I began searching for a way to make it easy to populate a combo box or other control from a premade list of states.
