LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 747
Default Excel memory and speed when inserting pictures ???

Hope someone can give me an insight on what's happening here so I can come up
with an elegant fix.

Background:
I have a fairly complex Excel project that allows you to select from a large
number of picture files (100 to 500 typically) and to display a portion of
them at a time on a worksheet. You can scroll through the entire selection by
calling a UF and using a scroll bar. This has to do with photo-mapping large
flat surfaces (e.g. bridge decks) and splicing the photos together so that
you can scroll through the entire survey area. For reasons I won't go into,
existing photo-stitching software is not suitable.

Problem:
The picture scrolling process involves systematic deletion of existing
photos followed by importation of new and appropriately sizing and
positioning the new. Sounds clunky but works quite well with a minor flaw:
After selecting the photo set, when you first start scrolling, there is a
slight delay in inserting the new photos. Loop code is used for this.
However, once a picture has initially been inserted, when you delete it by
scrolling past it and later reinsert it (scroll back to it), the speed is
much superior. It seems as though Excel remembers the photo and/or the
appropriate size.

Insertion Specifics:
The photos are selected using GetOpenFileName and, using configuration
information specified by the user (number of lines of photos by photos per
line), the file names are pasted to a hidden worksheet. The layout of the
names on the worksheet models the photo layout. The picture scrolling process
involves deleting the existing pictures and then importing the new pictures
by refering to the file names on in the hidden worksheet. Size and position
information is handled similarly.

Failed Efforts:
I wrote a procedure that "initiallized" the photos after selecting them.
This used loop code that individually inserted (without sizing and
positioning) and immediately deleted each of the selected photos with screen
updating set to False. This, however, didn't work. I tried another method
that ran through the entire photo set replicating the scrolling process
(delete old, insert new, size new, position new). This did work but was far
too clunky even with screen updating set to False.

Example Code:
I prepared example code for this post but couldn't replicate the problem. I
believe this is because of the relative simplicity of the example code. The
actual project is quite complex and it would take a lot of time to create
example code that replicates the problem. I was hoping to avoid doing this.
I'm just looking for general insights, suggestions; something that might get
me thinking in the right direction.

Much appreciative of any help.

Regards,
Greg




 
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
Inserting pictures into Excel Sheet at a particular size ToferKing Excel Discussion (Misc queries) 5 February 25th 10 07:03 PM
Speed of Excel When Inserting & Deleting Rows Gerry Excel Discussion (Misc queries) 13 March 5th 08 04:04 AM
Inserting pictures in Excel 2003 jawone48 Excel Discussion (Misc queries) 6 August 11th 07 06:17 AM
Problems inserting pictures in Excel 2002 sp-2 L.Skaggs Excel Discussion (Misc queries) 11 August 18th 05 01:14 AM
Memory Leak Excel 2003 vs 2000 using linked pictures Scriptick Excel Programming 0 April 27th 05 04:16 PM


All times are GMT +1. The time now is 08:48 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"