Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Duncan,
From your description it sounds likes the Excel worksheet part of is for data/setting storage and your "program" is mainly form based. If you first move data/setting part out of Excel (to ini file, DB etc), you will be most of the way towards compatibility. Whilst your forms may appear similar in VBA as they do in VB5/6, they are not directly equivalent. You can however save your VBA forms as text, then compare that to a similar form created in VB and compare the difference; or design them from scratch in VB. You should not have too much difficulty converting, as the logic of sub/functions will remain the same. Of course I have no idea what you achieve with you app, but it's certainly feasible. ...As long as you get a copy of VB. NickHK "Duncan" wrote in message ups.com... Hi Guys, I have always wondered, being fairly new to programming, how possible it is to get something ive made in excel vba and re-create it in vb6 or similar to make a standalone program? The main reason is that I have made a menu system and data input program through forms in vba but the fact that its tied to a spreadsheet ties it down a bit, i would love to be able to remove it from the spreadsheet and make it stand on its own. It uses the spreadsheet to hold the data but im sure it could do all the same stuff faster by just accessing a database instead of being within one. I think VB would be the best option for me as i am learning vba commands and it would be brill if i could easily take my vba code and compile it in a vb project. is this dream stuff? would i need to write it all again? Duncan |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Whilst your forms may appear similar in VBA as they do in VB5/6, they are
not directly equivalent. You can however save your VBA forms as text, then compare that to a similar form created in VB and compare the difference; or design them from scratch in VB. Indeed whilst superficially similar they are very different. If you (Duncan) already have large complicated vba Userform(s) that work well you can simply drag the *.frm into the vb6 project and use these. It/they will appear under "Designers" but you can use as-is subject to changing non form related code to suit your vb6, such as converting "implicit" references to excel objects and functions to explicit. The only other thing that will be different is the units for top/left form position. For Defer learning the VB6 Form until later and get on with other stuff immediately. Automatically brings in the correct ref to Office MSForms which might be required for other things. Against One day you will probably want to convert to a vb6 form and take advantage of a lot that's not available with a vba userform (though userforms have a few advantages). Best to do that from scratch. Control event arguments are different (eg byRef not byVal) and so are many of the control properties. eg a simple thing like - myCheckbox.Value = True will fail because VB6 expects 1, not -1 (true) Regards, Peter T "NickHK" wrote in message ... Duncan, From your description it sounds likes the Excel worksheet part of is for data/setting storage and your "program" is mainly form based. If you first move data/setting part out of Excel (to ini file, DB etc), you will be most of the way towards compatibility. Whilst your forms may appear similar in VBA as they do in VB5/6, they are not directly equivalent. You can however save your VBA forms as text, then compare that to a similar form created in VB and compare the difference; or design them from scratch in VB. You should not have too much difficulty converting, as the logic of sub/functions will remain the same. Of course I have no idea what you achieve with you app, but it's certainly feasible. ..As long as you get a copy of VB. NickHK "Duncan" wrote in message ups.com... Hi Guys, I have always wondered, being fairly new to programming, how possible it is to get something ive made in excel vba and re-create it in vb6 or similar to make a standalone program? The main reason is that I have made a menu system and data input program through forms in vba but the fact that its tied to a spreadsheet ties it down a bit, i would love to be able to remove it from the spreadsheet and make it stand on its own. It uses the spreadsheet to hold the data but im sure it could do all the same stuff faster by just accessing a database instead of being within one. I think VB would be the best option for me as i am learning vba commands and it would be brill if i could easily take my vba code and compile it in a vb project. is this dream stuff? would i need to write it all again? Duncan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
can the "convert" function in excel convert to UK gallons? | Excel Discussion (Misc queries) | |||
how will i convert 05.01.2007 convert 05.Jan.2007 format? | New Users to Excel | |||
convert decimal number to time : convert 1,59 (minutes, dec) to m | Excel Discussion (Misc queries) | |||
Convert Time...!convert tenths of a second | Excel Discussion (Misc queries) |