Hello,
I have a series of macros but want to insert a stop macro if the last row < 33 rows. Then it will give me a message box "Not Enough Film".
Hello,
I have a series of macros but want to insert a stop macro if the last row < 33 rows. Then it will give me a message box "Not Enough Film".
If Cells(Rows.Count, 1).End(xlUp).Row<33 Then MsgBox "Not Enough Film!":Exit Sub
I ran this macro and when i posted the macro in the series of macros I have. It still proceeds to calculate. I want the macro to stop at that point before it proceeds. Can you help me with that?
Step 1: Deletes Zeros
Step 2: Stop Macro
Step 3: Calculate
Need a lot more information on what you need.
BTW, you say "Calculate". Is your calculation set to manual or do you mean something else.
The calculation is set to calculate in the macro. When I press the macro the series of macros starts to process as follows: (Macro 1) Deletes zeros (Macro 2) Stop Macro (Macro 3) calculates for gel number. We have a macro that takes out all the test data that is not good for instance all the zero data. Then after that I want to put a stop macro after so that it does not proceed to the next step which is the calculate. I need at least 33 rows in my spreadsheet to calculate. Sometimes we have data that does not have enough lines as in 33 rows so it does not calculate right. So thats why I want a stop macro that it stops completely so that it does not calculate. Thats why I have a message that says not enough film.
Is there a good reason to have different macros running one after another? You cant have a single macro to everything?
So something like this?
Sub gdclyde() ActiveSheet.UsedRange.CellsWithZero.Delete If ActiveSheet.UsedRange.Rows.Count<33 Then MsgBox "Insufficient info, please finish!":Exit Sub Calculate gel number End Sub
Im sorry I think I am getting you mixed up. All I need is a macro that gives me a stop code from proceeding. If the last row is < 33 stop the macro. If > 33 then proceed to next step in the macro. All I need is this step. I have a list of macros that do specific things. So when I press the master macro it does the following.
Macro1: Deletes Zeros (I have the macro for this one)
Macro2: Stop macro from proceeding if last row is < 33, or if > 33 then proceed to next step (This step I need a macro for)
Macro3: calculate (I have the macro for this one)
Thanks
Re: All I need is a macro that gives me a stop code from proceeding
See Post #2
I ran that macro but the macro still proceeds to the next step which is calculating. The macro should stop and not proceed if the last row is < 33. If it is > 33 then it would go to the next step which is calculating.
Show us all code you have.
'This is the order of my macro
HTML Code:HTML Code:HTML Code:HTML Code:HTML Code:'This is all my macrosHTML Code:
I am sorry. I don't understand why all these different macros. I am sure that if you just combine everything into one macro it'll make everything easier to understand, for me anyway.
Maybe someone else can help you because I am lost for ideas.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks