Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA to VB
OK. I think i know someone with VS6... going to attempt to convert VBA to a VB project (VB 6 for ease). I have some basic questions to ask please:
1. The current system has code across a number of modules etc - do i just paste all the code into a single text file to import into studio & then correct it's references / syntax, or will there be a clever "import VBA" option in studio ? 2. The Excel functions used in the workbook - are they included / similar in VB 6 ie can this code run WITHOUT Excel present on the system - or are the advanced filters etc etc functions only part of Excel ? If the latter, are there any developer code etc that can be used with permission etc to create a standalone app ? These 2 questions will help shape the path - and in about 3 years i'll have i done !!! thanks again. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA to VB
Mike,
for 1., there is no "best practice" I guess. Whether you need one or more modules is just a matter of organisation. It doesn't change the behaviour of the program at all. For 2., the functions of Excel are not included since Excel is a separate program. However, you may use Excel from VB using automation. That is, creating a reference to Excel in VB and refer to its objects, methods and properties. But Excel still has to be on the target machine. Hope this helps you getting started. Stefan "Mike Iacovou" schrieb im Newsbeitrag ... OK. I think i know someone with VS6... going to attempt to convert VBA to a VB project (VB 6 for ease). I have some basic questions to ask please: 1. The current system has code across a number of modules etc - do i just paste all the code into a single text file to import into studio & then correct it's references / syntax, or will there be a clever "import VBA" option in studio ? 2. The Excel functions used in the workbook - are they included / similar in VB 6 ie can this code run WITHOUT Excel present on the system - or are the advanced filters etc etc functions only part of Excel ? If the latter, are there any developer code etc that can be used with permission etc to create a standalone app ? These 2 questions will help shape the path - and in about 3 years i'll have i done !!! thanks again. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA to VB
Hi Mike
You can rightclick an Excel module in the project explorer, then choose "export file". This generates a .bas file (which is nothing but a text file really) that you can import into VB6. But since you'll have to fine tune each single line of code anyway, I prefer to copy-paste macro by macro, or related groups of macros/functions, and make them work before pasting the next one. You should be able to find or write functions to replace the simpler spreadsheet functions. The complex ones are worse. All will definitely be far slower than Excel's built-in. So functions will need considerations one by one. If this is a huge or commercial project you should consider purchasing a spreadsheet control. It will be expensive and save you tons of work. Try http://www.componentsource.com/Catal...et&go= Search HTH. Best wishes Harald "Mike Iacovou" skrev i melding ... OK. I think i know someone with VS6... going to attempt to convert VBA to a VB project (VB 6 for ease). I have some basic questions to ask please: 1. The current system has code across a number of modules etc - do i just paste all the code into a single text file to import into studio & then correct it's references / syntax, or will there be a clever "import VBA" option in studio ? 2. The Excel functions used in the workbook - are they included / similar in VB 6 ie can this code run WITHOUT Excel present on the system - or are the advanced filters etc etc functions only part of Excel ? If the latter, are there any developer code etc that can be used with permission etc to create a standalone app ? These 2 questions will help shape the path - and in about 3 years i'll have i done !!! thanks again. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|