compile option vbaide
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
compile option vbaide

 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA
Author Message
MP
Guest





Posted: Tue Jan 04, 2005 11:50 pm    Post subject: compile option vbaide Reply with quote

Hi all,
am I missing something?
I run the Debug|compile option from the menu in the vba ide and nothing
happens (once all the errors are fixed :-) )
except that a bunch of menu options are greyed out.
Is that really the only response if a "compile" occurs successfully?
or is that "pseudo-compile" (since in my understanding vba can't compile)
no message no nothing?
Tia
Mark

Back to top
Ed Jobe
Guest





Posted: Wed Jan 05, 2005 12:29 am    Post subject: Re: compile option vbaide Reply with quote

Mark
In this case, no news is good news. :-)
VBA can compile, just not to exe or dll. It compiles to dvb. Hitting the
save button doesn't perform a compile. If you have the option
"Compile on demand" checked, you have to do this manually before you save
and exit. Otherwise, the code is compiled each time you run the project in
the IDE.
--
----
Ed
----
"MP" <nospam@Thanks.com> wrote in message news:41dae39e$1_3@newsprd01...
Quote:
Hi all,
am I missing something?
I run the Debug|compile option from the menu in the vba ide and nothing
happens (once all the errors are fixed :-) )
except that a bunch of menu options are greyed out.
Is that really the only response if a "compile" occurs successfully?
or is that "pseudo-compile" (since in my understanding vba can't compile)
no message no nothing?
Tia
Mark

Back to top
Laurie Comerford
Guest





Posted: Wed Jan 05, 2005 1:50 am    Post subject: Re: compile option vbaide Reply with quote

Hi,

Adding to Ed advice that no news is good news.

After compiling if you save the file in general the file size will be
increased significantly.

Try this:
Open a DVB file.
Save it from the VBAIDE
From the VBAMAN use Save As and save under another name - note the file size
Use the Debug compile
Save it from the VBAIDE
From the VBAMAN use Save As and save under yet another name
From the VBAMAN Unload the file
From the VBAMAN Reload the last file
From the VBAMAN use Save As and save under yet another name
Compare the file sizes.

--


Laurie Comerford
CADApps
www.cadapps.com.au

"Ed Jobe" <not.edljobe@hotmail.com> wrote in message
news:41daee84$1_1@newsprd01...
Quote:
Mark
In this case, no news is good news. :-)
VBA can compile, just not to exe or dll. It compiles to dvb. Hitting the
save button doesn't perform a compile. If you have the option
"Compile on demand" checked, you have to do this manually before you save
and exit. Otherwise, the code is compiled each time you run the project in
the IDE.
--
----
Ed
----
"MP" <nospam@Thanks.com> wrote in message news:41dae39e$1_3@newsprd01...
Hi all,
am I missing something?
I run the Debug|compile option from the menu in the vba ide and nothing
happens (once all the errors are fixed :-) )
except that a bunch of menu options are greyed out.
Is that really the only response if a "compile" occurs successfully?
or is that "pseudo-compile" (since in my understanding vba can't
compile)
no message no nothing?
Tia
Mark





Back to top
MP
Guest





Posted: Wed Jan 05, 2005 8:10 am    Post subject: Re: compile option vbaide Reply with quote

Yeah!
Kinda like hearing from the IRS?
:-)
Guess I just got used to the comforting progress bar in vb6 that at least
lets you know somethings happening.
I don't know what the difference between a "compiled" dvb is and an
uncompiled one since they both are binary gibberish when looked at in
notepad.
Any way that just goes to show how badly I've neglected the practice of
compiling before saving that it took till now to notice the lack of
reportage.
Thanks for the confirmation.
Mark

"Ed Jobe" <not.edljobe@hotmail.com> wrote in message
news:41daee84$1_1@newsprd01...
Quote:
Mark
In this case, no news is good news. :-)
Back to top
Laurie Comerford
Guest





Posted: Wed Jan 05, 2005 8:25 am    Post subject: Re: compile option vbaide Reply with quote

Hi,

Yours is a fairly small simple file, but even so you can see effects of file
size with the Debug Process. We have one program which flips around between
7Mb and 12Mb.

I still think it is worth while doing the "debug compile" as it will detect
syntax errors in the code which are better detected by you than by your
users.

--

Regards,


Laurie Comerford
www.cadapps.com.au


"MP" <nospam@Thanks.com> wrote in message news:41db5c77$1_3@newsprd01...
Quote:

"Laurie Comerford" <laurie@DeleteThiscadapps.com.au> wrote in message
news:41dafda0_3@newsprd01...
Hi,

Adding to Ed advice that no news is good news.

After compiling if you save the file in general the file size will be
increased significantly.

Try this:
Open a DVB file.
Save it from the VBAIDE

---> 27kb
interesting that that doesn't change file date in explorer window! -
Windows was written by a junior programmmer in day 1 of Windows and for
some reason MS have never sought to fix it. If you press F5 it mostly
updates.


From the VBAMAN use Save As and save under another name

that does refresh the date

- note the file size
---> 32kb

Use the Debug compile
Save it from the VBAIDE

second time it does refresh the date!
---> 48kb

From the VBAMAN use Save As and save under yet another name

---> 32kb

From the VBAMAN Unload the file
From the VBAMAN Reload the last file
From the VBAMAN use Save As and save under yet another name

---> 32kb

Compare the file sizes.

--


Laurie Comerford
CADApps
www.cadapps.com.au

things that make you go hmmm.....

:-)
Greets ta down under!
Is it summer time down there?
While I'm over here under 1" sheet of ice!

Back to top
MP
Guest





Posted: Wed Jan 05, 2005 8:25 am    Post subject: Re: compile option vbaide Reply with quote

"Laurie Comerford" <laurie@DeleteThiscadapps.com.au> wrote in message
news:41dafda0_3@newsprd01...
Quote:
Hi,

Adding to Ed advice that no news is good news.

After compiling if you save the file in general the file size will be
increased significantly.

Try this:
Open a DVB file.
Save it from the VBAIDE

---> 27kb
interesting that that doesn't change file date in explorer window!

Quote:
From the VBAMAN use Save As and save under another name

that does refresh the date

- note the file size
---> 32kb

Quote:
Use the Debug compile
Save it from the VBAIDE

second time it does refresh the date!
---> 48kb

Quote:
From the VBAMAN use Save As and save under yet another name

---> 32kb

Quote:
From the VBAMAN Unload the file
From the VBAMAN Reload the last file
From the VBAMAN use Save As and save under yet another name

---> 32kb

Quote:
Compare the file sizes.

--


Laurie Comerford
CADApps
www.cadapps.com.au

things that make you go hmmm.....

:-)
Greets ta down under!
Is it summer time down there?
While I'm over here under 1" sheet of ice!
Back to top
Ed Jobe
Guest





Posted: Wed Jan 05, 2005 9:48 pm    Post subject: Re: compile option vbaide Reply with quote

Since you're familiar with vb, it should be easier to understand the
difference. In vb, you compile to an exe or dll. You know that the "code"
you are editing is just text, since you can open the bas file in Notepad and
you can't "run" it. Compiling is the process of translating a higher level
language into a lower one, one that the cpu can run. Granted the dvb is all
"gibberish", but not because its compiled. Its because its in binary format.
Part of it stores the text portion and part of it stores the compiled
portion. Its possible, that at first it may not contain any compiled code.
When you Debug>Compile, the compiled portion gets added. So a dvb is
comparable to adding an exe, prj, bas, cls, and an frm all together, all the
project files and the executable. That's why the project browser looks the
same in vba as it does in vb, just that vb has to read the info from
separate files.

Laurie gave the example of 7mb growing to 12mb, a difference of 5mb. The
compiled version is usually less than the non-compiled because it takes more
memory to represent an instruction in human-readable form, e.g. one-two
bytes for an instruction vs. many bytes for several characters.

--
----
Ed
----
"MP" <nospam@Thanks.com> wrote in message news:41db58cd$1_3@newsprd01...
Quote:
Yeah!
Kinda like hearing from the IRS?
:-)
Guess I just got used to the comforting progress bar in vb6 that at least
lets you know somethings happening.
I don't know what the difference between a "compiled" dvb is and an
uncompiled one since they both are binary gibberish when looked at in
notepad.
Any way that just goes to show how badly I've neglected the practice of
compiling before saving that it took till now to notice the lack of
reportage.
Thanks for the confirmation.
Mark

"Ed Jobe" <not.edljobe@hotmail.com> wrote in message
news:41daee84$1_1@newsprd01...
Mark
In this case, no news is good news. :-)

Back to top
MP
Guest





Posted: Thu Jan 06, 2005 2:36 am    Post subject: Re: compile option vbaide Reply with quote

Thanks for the info.
Yes that is understandable.
"Ed Jobe" <not.edljobe@hotmail.com> wrote in message
news:41dc1a5b$1_1@newsprd01...
Quote:
Since you're familiar with vb, it should be easier to understand the
difference.


Quote:
Laurie gave the example of 7mb growing to 12mb, a difference of 5mb. The
compiled version is usually less than the non-compiled because it takes
more
memory to represent an instruction in human-readable form, e.g. one-two
bytes for an instruction vs. many bytes for several characters.


that's what I would have expected as well (compiled < uncompiled), though I
wasn't sure why I expected that. Your explanation makes perfect sense.
However as his test shows it's the other way around. (at least in the small
test i did)
go figure.
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB