|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (7 bit)
|
Visual Basic Question
Hi All
I am trying to writea quotes package for an insurance company in VB. To give you a background, I wrote a simple package in Excel, but now need to make it look a little more professional. Not knwing languages like Delphi and the like it has been advised that I make use of VB due to the ability to integrate easily with Excel. Now being a newbie to programming I have little idea of where to start. The most concerning part of course is being able to incorporate the existing formulae for working out the rates (according to age and profession with differentiating waiting periods). I have an idea of how I would like the QP to look, but have difficuluty explaining it. I know some of you are able to post pics of exactly what one sees on screen. How does one do that (like taking a picture of your screen). Any help with any of the above would be much appreciated. Regards CJ |
|
|
|
|
|
#2 |
|
Come in Ray...
Join Date: Sep 2004
Posts: 1,668
|
When you are in Excel, you can record a macro of the operations you want to perform and then view the actual VB code generated in the built in Excel macro editor. This is the fastest way to learn VBA for Excel.
As for the "I know some of you are able to post pics of exactly what one sees on screen," are you talking about the Print Screen button on your keyboard? If so, hit Print Screen and then paste the clipboard into a graphics program. |
|
|
|
|
|
#3 | |
|
Member (7 bit)
|
Quote:
As for the package, I have designed the "face" of the QP in VB, but am having issues with incorporating the formulae used to work out the premiums (these are based on 3 criteria namely: Occupational Category, Waiting Period and Benefit Period). When you say "record the macro of the operations" in excel, how do I do this? And once it is recorded, is it just a case of copying and pasting the code into VB? Again, your help is much appreciated. |
|
|
|
|
|
|
#4 | ||
|
Come in Ray...
Join Date: Sep 2004
Posts: 1,668
|
Quote:
Give the macro a name (i.e. Test) and then on the Excel forms do your operations as you would if you were just using Excel normally. In this case, set up a formula to multiply your columns. The macro records your actions in the background. After you are done you can select Tool->Macro->Visual Basic Editor and see your Test function and all the code it generated. Quote:
Code:
Dim xl As New Excel.Application With xl .Workbooks.Open ExcelFileName 'open the Excel workbook with the data 'pasted from macro End With |
||
|
|
|
|
|
#5 |
|
Member (7 bit)
|
Thanks Faulkner. Am getting there slowly, but surely.
Do you or anybody else know where I acn get hold of VB6 instead of having to use the VB Editor on Excel? Makes sense to get the proper program if I am going to learn the language. |
|
|
|
|
|
#6 |
|
Member (7 bit)
|
You can use this trial version of visual studio.net 2003 for up to two months, or just get the visual basic package here .
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|