Minggu, 13 Januari 2013

Re: [ExcelVBA] Re: Puzzling Behavior

 

Michael,

The first thing I try when faced with "intermittent" behaviour is DoEvents.

As Dave says, it could be a memory problem and Derek suggests an automation error.

If it's automation then the DoEvents *may* help. As you may know it holds up windows stuff until everything is done before allowing the code to continue.

Try putting a DoEvents after the End With and see what happens.

If you still get the same probs then because the code is so short, you could try peppering the code with DoEvents after each line.

Do get back to us if you still have problems.

HTH
Lisa

Sent: Sun, Jan 13, 2013 5:58 pm

Subject: [ExcelVBA] Re: Puzzling Behavior

Thank you all for your suggestions.

I am adding about 2,000 shoes styles to my web store. Each shoe style has about
10 sizes, each of which must have its own row for inventory purposes. Different
styles have different size ranges, 5 to 12, 6 to 14, S, M, L, etc. As I add each
size for a particular style, I store the size in a separate sheet. When I finish
with a style, I sort the sizes, and then concatenate them into a string, which I
enter as part of the description of that style.

I thought about storing the sizes in an array, and sorting them myself, but I
figured Excel would have no trouble sorting less than 12 cells. Perhaps the sort
itself imposes an overhead, which when repeated more than 1,000 times, causes
the error.

I will contact the people who host my store and ask if it is necessary that the
sizes be sorted. If not, the problem is solved, but if they must be sorted, I
will sort an array myself.

To answer Lisa, there is no recursion involved in the code.

Thanks again for your always helpful suggestions.
Michael Trombetta

[Non-text portions of this message have been removed]

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (6)
Recent Activity:
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------
.

__,_._,___

Tidak ada komentar:

Posting Komentar