Excel VBA one macro to run multiple macros not working

Stuepef

Board Regular
Joined
Oct 23, 2017
Messages
128
Office Version
  1. 2021
Platform
  1. Windows
I want one macro to run several other macros, but when I write the code, I receive a compile error - sub or function not defined. What am I missing?

Code:
Sub Runallmacros()    
    Call LYRates
    Call TYRates
    Call DeleteSpaces
End Sub
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
No, like
Code:
Sub TyRates()
Stop
The rest of the code
 
Upvote 0
Yes, the word stop is highlighted when I insert it into the TYRates module.

Code:
Sub TYRates()
Stop
   Dim Usdrws As Long
   
   Application.ScreenUpdating = False
   With Sheet13
      Usdrws = .Range("A" & Rows.Count).End(xlUp).Row
      .Range("A1").AutoFilter 1, "<>" & Sheet2.Range("AZ43").Value
      .Range("A2:A" & Usdrws).SpecialCells(xlVisible).EntireRow.Delete
      .Range("A1").AutoFilter
   End With
End Sub
 
Upvote 0
When Stop is highlighted, switch to sheet13 & then step through the code using F8, can you see the sheet getting filtered?
 
Upvote 0
man I must need more coffee, the reason it was not working was because I had it filtered already for a different reason. Once unfiltered, it works fine. Sorry for the question! :eeek:
 
Upvote 0
No worries & glad it's sorted.
Thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,313
Members
452,634
Latest member
cpostell

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