View Single Post
 
Old 01-19-2012, 05:22 PM
Marrick13 Marrick13 is offline Windows XP Office 2010 32bit
Competent Performer
 
Join Date: Jun 2006
Posts: 102
Marrick13 will become famous soon enough
Default Loop through listboxes in Application.OrganizerCopy

Paul,

Thanks for the correction. The code runs withour error, but I'm still seeing an issue with adding other docs to the target listbox3 in the Sub CmdTarget_Click module:

1. If I choose one target file, it displays in the list; the listcounter shows as "1." But then when I select another file (from same or different source folder), the new doc overwrites the original in the list (so there is one doc listed); listcounter shows as "2" which is correct.

2. If I choose two target files, they display in the list; listcounter shows as "2." But then when I select another file (from same or different source folder), the new doc overwrites the bottom original in the list (so there are two docs listed); listcounter shows as "3" which is correct.

I still also would like this listbox to be sorted but it's a two-column box - how to do that?

I have another problem with a msgbox I just added to the Sub CmdCopyStyle_Click module. The intention is to display a textbox reading "Processing..." as soon as the copy routine starts ("Me.txtProcessing.Visible = True"). When I step thru the code, the textbox displays and shuts off at the end when another textbox displays showing the number of styles copied to the number of documents. But during runtime the "Me.txtProcessing.Visible = True" has no effect; if I comment out the statement that shuts it off when the other stats textbox becomes visible, then the txtProcessing textbox displays (so both appear at the same time, but only after the copy code has run).

I even placed a beep just before the "Me.txtProcessing.Visible = True" and it did beep during runtime but still didn't display the textbox. If I place an exit sub right after the statement, the textbox displays (but of course the code stops). So then I tried some code to delay the macro and even put the whole module in another module and ran the display code separately to see if I could "fool" VBA, but nothing worked. I also tried adding if statements, and that didn't do anything.

So there's apparently something about the loop code that prevents the textbox from displaying (but only during runtime). Any idea why the txtProcessing doesn't display when it should during runtime?

Latest version is attached.
Attached Files
File Type: doc Style Copier Application (Jan 19 2012).doc (145.0 KB, 21 views)
Reply With Quote