Thread: VBA to VB
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Harald Staff Harald Staff is offline
external usenet poster
 
Posts: 1,327
Default 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.