Macro Not Executing - Just does one

uflbabe

New Member
Joined
Mar 5, 2018
Messages
3
I have a macro, and it is only pulling the one macro to print. The formula is not continuing onto the next one. I'm newer at writing code. I've done this both ways using the Call function and just adding the subs into once macro....

Sub RunAll()
FW
bonbon
End Sub

Sub ShocoChoc()

If IsDate(Range("a4").Value) Then
Sheets("Working").Select
Range("A4").Select
Selection.Copy
Sheets("Sheet2").Select
Range("B5").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Working").Select
Range("B4").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("B4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Working").Select
Range("C7:C9").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("A11").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Working").Select
Range("E7:E9").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("B11").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Working").Select
Range("F5:H9").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("A22").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

Sheets("sheet2").PrintOut From:=1, to:=1, copies:=1
Sheets("sheet2").Range("a11:c18, b4:b7, a22:c28").ClearContents
End If

Call bonbon

Sub bonbon()
If IsDate(Range("a13").Value) Then
Range("A13").Select
Selection.Copy
Sheets("Sheet2").Select
Range("B5").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Working").Select
Range("B13").Select
Selection.Copy
Sheets("Sheet2").Select
Range("B4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Working").Select
Range("C14:C17").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("A11").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Working").Select
Range("E14:E17").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("B11").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Working").Select
Range("F13:h17").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("A22").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

Sheets("sheet2").PrintOut From:=1, to:=1, copies:=1
Sheets("sheet2").Range("a11:c18, b4:b7, a22:c28").ClearContents
End If

Call FW


End Sub
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Re: Help! Macro Not Executing - Just does one

Should it not be:

Code:
Sub RunAll()
ShocoChoc
Bonbon
FW
End Sub
 
Upvote 0
Re: Help! Macro Not Executing - Just does one

Hi, even changing the order. it still only runs the first macro
 
Upvote 0
Re: Help! Macro Not Executing - Just does one

Thank you - I've changed it but it still will only run the Shocochoc and will not proceed to the other two.
 
Upvote 0
Re: Help! Macro Not Executing - Just does one

Have you tried stepping though it to see what is going on?

Just go to the VB Editor, click on the first line of the RunAll procedure, and press F8 to start stepping through your code.
Continuously hit F8 to run through the code one line at a time, and see where things seem to be stopping.
 
Upvote 0
Re: Help! Macro Not Executing - Just does one

Are the dates in A4 and A13 on same sheet? as after Shocochoc ends, bonbon is skipped as A13 is empty

Code:
Sub Runall()
If IsDate(Range("a4").Value) Then Call shocochoc
If IsDate(Range("a13").Value) Then Call bonbon
Call Fw
End Sub


Code:
Sub shocochoc()
Sheets("Working").Select
Range("A4").Select
Selection.Copy
Sheets("Sheet2").Select
Range("B5").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Working").Select
Range("B4").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("B4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Working").Select
Range("C7:C9").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("A11").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Working").Select
Range("E7:E9").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("B11").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Working").Select
Range("F5:H9").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("A22").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False


Sheets("sheet2").PrintOut From:=1, to:=1, copies:=1
Sheets("sheet2").Range("a11:c18, b4:b7, a22:c28").ClearContents
End Sub


Code:
Sub bonbon()
Range("A13").Select
Selection.Copy
Sheets("Sheet2").Select
Range("B5").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Working").Select
Range("B13").Select
Selection.Copy
Sheets("Sheet2").Select
Range("B4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Working").Select
Range("C14:C17").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("A11").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Working").Select
Range("E14:E17").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("B11").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Working").Select
Range("F13:h17").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("A22").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False


Sheets("sheet2").PrintOut From:=1, to:=1, copies:=1
Sheets("sheet2").Range("a11:c18, b4:b7, a22:c28").ClearContents
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top