Hey Dear community,
I have 20-30 subs , when i run them 1by1 they work right, but when i "call" all of them , i get wrong results. Can anybody help me with this problem please?
Hey Dear community,
I have 20-30 subs , when i run them 1by1 they work right, but when i "call" all of them , i get wrong results. Can anybody help me with this problem please?
Stab in the dark & crystal ball gazing may eventually find an answer - BUT there is no better way than analyzing the actual code.
Welcome to the forum
Please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.
Remember to desensitize the data.
Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
Well, there could be differnt reasons for that. And a lot depends on a code in these subroutines.
What quite often helps in such cases (especially if I/O operations or calling external programs happens in these pieces of code) is to add DoEvents between rthe calls.
like
Please Login or Register to view this content.
Sometimes (if you can afford some delay) you could also add there Application.Wait
Best Regards,
Kaper
Administrative Note:
We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not provided the required cross-post link(s) here.
Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important.
(Note: this requirement is not optional. No help to be offered until the link is provided.)
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
Forum Rules (updated August 2023): please read them here.
Hey AliGW , can you give me example what you want me to say? provide link where i asked same question?
like this: https://www.mrexcel.com/board/thread.../#post-5594675
It is not working... code calculates only first 9 row...
Here is code..
Please Login or Register to view this content.
@CWever
Administrative Note:
Welcome to the forum.
We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.
Please see Forum Rule #4 about hijacking and start a new thread for your query.
If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
Alan עַם יִשְׂרָאֵל חַי
Change an Ugly Report with Power Query
Database Normalization
Complete Guide to Power Query
Man's Mind Stretched to New Dimensions Never Returns to Its Original Form
Try what Kaper suggested. Add this line before the first call, and also after each call line:
Application.Wait (Now + TimeValue("0:00:02"))
It will slow down your code because there will be a 2 second wait after each call but it might fix your problem. So like this:
If that works, then change the 2 to a 1 to make it a little faster and see if it still works.Please Login or Register to view this content.
Hi achammar , thanks for trying help me. I tried your suggestion. Result is same. I think problem is in this code
When i change "AE25:AE" & lr to "AE25:AE2000" i get correct results. Can you tell me what am i doing wrong?Please Login or Register to view this content.
Try changing this:
Set ResRange1 = Sheets("DATA").Range("AE25:AE" & lr)
to this:
Set ResRange1 = Sheets("DATA").Range("AE25:AE" & Trim(Str$(lr)))
Last edited by achammar; 11-25-2020 at 06:06 PM.
How aboutOtherwise you may be calculating the last row on the wrong sheet.Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks