The following code copies data from the range A6:A7 on one sheet to the range B5:B6 on another sheet. I would like to change the code to paste to the range B5:B6 & E5:E6. How can I do this?
Please Login or Register to view this content.
The following code copies data from the range A6:A7 on one sheet to the range B5:B6 on another sheet. I would like to change the code to paste to the range B5:B6 & E5:E6. How can I do this?
Please Login or Register to view this content.
Last edited by rhudgins; 11-01-2010 at 07:49 PM.
Repeat this line:
but change the first range address.Please Login or Register to view this content.
Remember what the dormouse said
Feed your head
Thanks. My code is going to perform that same routine on sheets 20,21,22 & 23. How can I change my code to then run the macro RunResults on sheets 20,21,22 & 23 in numeric order?
Please Login or Register to view this content.
You'd need a loop. Assuming that the macro runs on whatever sheet is active, you would need something like:
Please Login or Register to view this content.
Thanks the only problem I am having with that solution is that the macro RunResults takes about 15 seconds to complete. After including the loop, the code is not waiting for RunResults to complete before heading to the next step.
What does RunResults do?
It is a long code that filters and copies data based upon multiple conditions.
The code should not run asynchronously, so I was assuming you were doing some sort of background querying. If you are just filtering, there should not be that issue - assuming you are using the same instance of Excel to do the processing.
hi all,
Snb & RomperStomper,
Just to let you know that I think you are both working towards very similar goals - see the respective links for the flip side of the coin... http://www.excelforum.com/excel-prog...e-to-code.html & http://www.excelforum.com/excel-prog...ry-slowly.html
Rhudgins,
I think your various threads are so inter-related that they should all be in one place. Especially considering my below post which relates exactly to your question in this separate thread (http://www.excelforum.com/excel-prog...e-to-code.html).
Romper, should/can these threads be merged?
Or is this linkage enough/too much ?
(I've posted the same response in each of the threads.)
Rob
Rob Brockett
Kiwi in the UK
Always learning & the best way to learn is to experience...
I am somewhat confused with what you just said.
The destination ranges on sheet 20 should be filled with the values from A6:A7, then RunResults should run and then the same process should occur or sheets 21,22,23.
RunResults should run independantly on the same worksheet as each destination range
Rob,
I'm going to leave the threads separate (for the time being, anyway) as the original purpose of this question is different.
I apologize, it works fine. Thank you for the help!
Thanks RomperStomper,
I'm not sure if "I've posted the same response in each of the threads" or not - my connection seems to have a very bad case of hic-cups tonight, so I apologise if I've made any duplicate posts...
Ahhh well, it's Solved now, so it's all good :-)
Rob
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks