LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default L2013 not running code from XL7, second posting

I have a worksheet with VBA code that has been in use for at least 12 years.
It still works flawlessly in XL7 (2007). The code opens a folder which
contains 24 photos (5M each) and places them in a worksheet along with their
file name and date. The code even fails when I step thru the code, but seems
to hesitate for some reason. The lines of code which appears to be causing
the problem is as follows:

For x = 10 To 430 Step 140
If Directory = "" Then Exit Sub
ActiveSheet.Shapes.AddPicture Directory & f, _
True, False, x, y, 130, 100
Cells(r, c) = f
Cells(r, c + 1) = FileDateTime(Directory & f)
f = Dir


The line with "Shapes.AddPicture " seems to be the area of concern. XL13
appears to be handling pictures differently, but why?

Any ideas about this line ??

BTW, I have tried the code approximately 25 times. I had one attempt which
completed properly, but it took nearly 45 seconds to complete versus 4-5
seconds for XL7. Very strange.

 
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
while my c# code running ,clicks on excel document interrupts code Kayıhan Excel Programming 2 April 8th 09 11:54 AM
posting code ward376 Excel Programming 1 November 21st 07 10:22 AM
Posting code with IF Robert Excel Programming 7 September 15th 05 07:26 AM
(1) VARIABLE IN POSTING CODE (2) LOOPING Robert Excel Programming 2 September 14th 05 06:31 AM
the owner of posting should be able to delete the posting Mahendra Excel Discussion (Misc queries) 7 August 8th 05 07:21 PM


All times are GMT +1. The time now is 02:34 PM.

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"