Re: Cannot lock project

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



If you run Rob's code cleaner (which exports the code to a text file and deletes
that module), I'm not sure how anything code related (bloat included) could live
through that.

And I've never noticed significant filesize changes between an add in and a
normal workbook. But that article is pretty old--maybe there used to be????



Peter T wrote:
>
> Thanks Dave for your further suggestions. Time, hmm, a sore subject <g>
>
> I did as you suggested (didn't take long!), imported all code into a new wb,
> same number of sheets but each totally empty. Saved non-compiled (no code
> run) & full compiled versions. +700kb difference in size, as expected.
>
> I'm fairly confident file bloat is not related to worksheets and have
> discounted the state of compile. As I mentioned yesterday, I removed all
> modules and other code from the "old" bloated project and saved. Resulting
> size similar to creating a new wb + sheets from scratch.
>
> During the process of development new code, proc's, modules etc are added,
> moved & deleted with multiple file saves during the process. I suspect what
> occurs is references (for want of a better word) to extinct stuff remain in
> the workbook, hence gradual size increase.
>
> In a sense this is not normally a problem during development providing
> everything works. Although I don't understand why that occurs I know it
> does, so when done I build a new workbook and import the code.
>
> I've just re-read the Don Baarns article, this remark caught my eye -
>
> "Turning the code into an Add-In (<snip>) can also return a file to its
> previous size."
>
> I develop in an xls before converting to an xla. I have never noticed a
> decrease in size after conversion. But perhaps there's a clue in that remark
> that relates to my un-expected size decrease after saving from the immediate
> window (at the time an xla & IsAddin true).
>
> Regards,
> Peter T
>
> "Dave Peterson" <petersod@xxxxxxxxxxxxxxxx> wrote in message
> news:4311B144.30037F69@xxxxxxxxxxxxxxxxxxx
> > I've read the Baarnes' article before--but thanks for the links.
> >
> > Someday when you have time (hehe), maybe you could createworkbook and copy
> all
> > the modules there--but don't put any data into any worksheet.
> >
> > Then modify the code, compile, and save to see what happens. This might
> help
> > you isolate the filesize difference (is it really worksheet related or
> code
> > related?).
> >
> > If it's related to worksheets, maybe you could try to isolate one of them
> to see
> > if it's just one--then rebuild that single worksheet.
> >
> >
> >
> > Peter T wrote:
> > >
> > > Hi Dave,
> > >
> > > > But after you've run Rob's codecleaner, if you saved one version with
> the
> > > code
> > > > compiled (either by running/testing code or by debug|compile
> VBAProject)
> > > and
> > > > another without this extra step, then that could add to the difference
> in
> > > size.
> > > > (Although, I don't think I've seen the file change size by as much as
> > > 300k.)
> > >
> > > My particular project expands by about 700Kb between doing a
> "Codecleaner"
> > > and a debug full compile. Seems a lot but I think normal, about 15,000
> lines
> > > of code, many controls and stuff.
> > >
> > > Off topic & FWIW, for a final project I've found the best compromise
> between
> > > size & performance is not to compile, but start with a "clean" project
> and
> > > run at least one proc' from each "frequently used" module. Perhaps also
> > > remove Option Explicit (not sure about that). * See link below.
> > >
> > > Over a period of time, and without building a new wb, I have moved a few
> > > thousand lines to a referenced dll. I've noticed the difference between
> > > non-compiled (no code run) & compiled increasing. Ie, non compiled file
> > > getting smaller, compiled size only slightly smaller.
> > >
> > > As I mentioned to Tom, I don't think XL version and/or protected is a
> > > significant factor with my project.
> > >
> > > In the course of development I've often found file size to gradually
> > > increase, irrespective of the amount of code. I'm always careful about
> the
> > > "lastcell" etc. It did not come as a total surprise yesterday when I
> built a
> > > new identical project and file size decreased (with similar 700kb diff'
> > > between non-compiled & compiled).
> > >
> > > What was a surprise was by saving from the immediate window my old
> project
> > > reduced in size to close to that of a similar brand new project, 300Kb
> > > smaller in both states of compile. The other surprise of course was this
> > > solved my lock problem!
> > >
> > > Regards,
> > > Peter T
> > >
> > > * I read this by Don Baarns a long time ago and found highly informative
> > > http://archive.baarns.com/excel/develop/vbaperfm.asp
> > >
> > > There are no links on that page, so -
> > > http://archive.baarns.com/IE4/index_devonly.asp
> > >
> > > <snip>
> >
> > --
> >
> > Dave Peterson

--

Dave Peterson
.



Relevant Pages

  • Re: whats it do
    ... what you mean by formula bar. ... toolbar not active X controls. ... "Dave Peterson" wrote: ... Have never used compile and haven't read any in my books. ...
    (microsoft.public.excel.misc)
  • Re: Panic switching to 64 bit kernel
    ... You bloat the binary, you bloat the installed OS, and you bloat the ... have to do is compile a simple program in 32-bit and examine the asm file and then do the same in 64-bit mode. ... For sparc I'm not sure if this is the case, as I know that the G4 is a 32-bit proc and the G5 is a 64-bit proc and the Apple docs pretty much state to just use 32-bit for a bit faster code if you aren't going above 4Gb. ... Both have the same number of general purpose registers. ...
    (comp.unix.solaris)
  • Re: VBA Extensibility library and dynamic code compilation
    ... Your live data feeds etc is way outside what I know about so this may seem ... compile I seem to be able to changes values a few more times before Excel ... since they do not have any real time data ... "Peter T" wrote: ...
    (microsoft.public.excel.programming)
  • Re: Can OpenNet.CF SmartList be used as is in VB.NET?
    ... As Peter said you'd better off wating fore a few days for a release. ... >> compile this file in VS.NET and then somehow have the control be ... >> usable from within VB.NET or is SmartList dependant on other new files ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: a problem with excel addin
    ... Can you not change the LoadBehavior setting in the IDE before you compile ... "Peter T" wrote: ... program and that external program is set to MSExcel. ... Am able to see my commandbar with the ...
    (microsoft.public.excel.programming)