how to connect to an excel database using Visual Basic 2008?
frosty asked:
hey guys, i have set up a calculator in excel and would like to make a visual basic program to make the calculator easier to use, how do i connect to the data in excel from Visual Basic 2008? when that is done, how do i set cell refs to form components such as a text box? thanks
Related posts:
- Visual Basic Programming Help? Bipul M asked: Does anyone know the code to save...
- visual basic programming? Raghubir S asked: hi all my knowledge of visual basic...
- How to create a login form in visual basic which is linked to SQL server database? HELP? Zacken asked: I’m creating a database program in Visual basic...
- how would you call data from documents in visual basic? someone… asked: i am trying to call information from a...
- I have a question here about Visual Basic programming, hope you guys will answer:? bill asked: I want to create a program (in Standard...
Filed Under Programming & Design |
Tagged With Calculator, Hey Guys, Visual Basic Program
Comments
One Response to “how to connect to an excel database using Visual Basic 2008?”
Consider sticking with Excel, rather than trying to use VB 2008. Excel’s VBA includes many of the capabilities of VB 2008 including forms and probably has everything you would need.
If you haven’t been there before, press Alt-F11 to view the VBAProject . Note the Microsoft Excel Objects and the large panel with the two drop down list at the top. Select (General) > Worksheet and then look at the other dropdown list.
Also select Insert > UserForm to see the VBA near equivalent to a VB 2008 form. As you look around you will see more familiar things.
Back in a worksheet, select Tools > Macro > Record New Macro > OK. Then do a few things in the worksheet like formatting cells, adding rows, naming ranges, or whatever. Then select Tools > Macro > Stop Recording > Alt-F11 and notice the new Modules folder. Expand it, double click Module1, and select Macro1 in the (Declarations) dropdown list to see the VBA code to do what you just recorded.
That should be enough to get you started with the fun of discovering Excel VBA Macros. I hope you are using Excel 2003 as it is a bit simpler, than 2007, to get around in and the Visual Basic help is local rather than on line. The part I use most is Help > Microsoft Visual Basic Help > Microsoft Visual Basic Documentation > Visual Basic Language Reference. The other aid I use constantly is the View > Object Browser. On the other hand Excel 2007 may offer some advantages in capability you would be interested in.