Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Convert from vba to vb?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Convert from vba to vb?

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
can the "convert" function in excel convert to UK gallons? JR Excel Discussion (Misc queries) 2 April 24th 08 04:55 PM
how will i convert 05.01.2007 convert 05.Jan.2007 format? lady_like New Users to Excel 17 February 9th 07 12:43 PM
convert decimal number to time : convert 1,59 (minutes, dec) to m agenda9533 Excel Discussion (Misc queries) 8 January 20th 05 10:24 PM
Convert Time...!convert tenths of a second Pape Excel Discussion (Misc queries) 2 December 16th 04 10:17 AM


All times are GMT +1. The time now is 08:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"