call a macro

  1. K

    Select the Name in the Data Validation list on a cell value then the same name run the sub macro

    Excel VBA code is required to Select the Name in the Data Validation list on a cell value after the same name could be run in the sub macro. E.g. Data Validation List assigned in "Sheet3" cell text value "B2". if I select the "AA" and then Call to "AA" Sub Marco run. I got error the code line...
  2. D

    Carryover variable to called sub

    I am attempting to simplify some VBA code as it has gotten fairly long and is taking an extensive amount of time to run. I have multiple cubes that are updated weekly and I need to copy data from those cubes to a new sheet where I can manipulate and make edits. Rather than having three subs with...
  3. larinda4

    Msg box with 3 options - Call A Sub

    Good morning, I have three separate VBA codes and I want it to run a specific sub depending on the option selected from a MSG box? My three options for the msg box: - WI - WI, H&D - H&D The user will select which one and then I want it to call the sub depending on the selection. Can this be...
  4. H

    Private Sub Worksheet_Change(ByVal Target As Range) Not working

    Hi, I am trying to trigger Macros according to the value cell A2 of Sheet1 is changed to. After changing the value in A2 nothing seems to be happening. What am I missing? Cell A2 is merged with everything up to cell B7, but I have also tried without the cell being merged. Private Sub...
  5. J

    How do I Unhide, Refresh Query and Re-hide rows in VBA???

    Hi All, Another stumbling block on my road to VBA proficiency! This is a weird one. I'm currently stuck trying to run a macro sheet 2 from sheet 1. I only want the macro to execute in sheet 2 (sheet 1 should stay unaffected). Furthermore, when I run the macro, I want to remain on the active...
  6. P

    Call Macros

    Is it possible to call Macro and then edit its variables ? Sub Save_All_Files() Call Account_Name_And_Year_1 Call Data_2021_1 Call Account_Name_And_Year_1 Call Data_2022_1 With Account_Name_And_Year_1 With wb With ws...
  7. P

    Call Sub using Concatenation

    How do I call a Subroutine using Concatenation? Example: I have 9 subs and I want to call one of them. They all begin with: Group_Evens_Down_Slots_wo_ (1 through 9) Would it be something like this?: GN = Range("next_slot") ' ' GN = 3 in this case ' ' Call Group_Evens_Down_Slots_wo_ & GN...
  8. C

    Passing Variables between Macros

    Hi Guys, Unsure if you are able to do this. Example 1. Macro - Sub Test 2. Macro - Sub Test2 Within macro "Test " I'm calling macro "Test2" and passing a variable. The called macro "Test2" does what it needs to do and once completed I need to pass variables back to the main macro "Test"...
  9. D

    My sequence of Macros stops running after one of the macros closes another workbook

    Hi everyone, Hope you're having a great Friday! I am running a sequence of macros as follows: Sub RunMacroSequence_Click() Call ClearContentsBelowRowTwo 'Macro1 Call copyDataFromMultipleWorkbooksIntoMaster 'Macro2 Call ExportOpsManPOReconExport 'Macro3 Call...
  10. I

    Trigger a macro via a hyperlink

    Hi there, I have a series of hyperlinks on a tab that when clicked i want to hide/unhide specific rows. I have looked around online and realize i cannot have more than one Worksheet_FollowHyperlink but that i can build a macro that calls on other macros to work around this. i have built...
  11. bobkap

    "Call" to run other macros

    Is there a limit to how many "Call" statements you can make in a macro? I have a "Master" macro that holds the following 4 statements: Call HST_create_sheet Call HST_move_columns Call HST_Mo_Bill_Format Call Format2 When I run the Master macro only the first two of these run. If I do a...
  12. B

    VBA Call Macro From Hyperlink Not Working

    Hello, I am trying to create a column of hyperlinks that either 1) directs to a customer's workbook, or 2) for new customers, creates a new customer workbook and changes the active cell to make it link to their new workbook. I have a macro that completes this task, called NewCustomer, but am...
  13. J

    Code working by itself, BUT not when "call"ed by another code

    Hi all - I have been recieving some help pertaining to finding empty rows. I got the code to work: Dim nLastrow, bFind As Range Dim ii As Integer For ii = 2 To 5 nLastrow = Cells(Rows.Count, 3).End(xlUp).Row Set bFind = ActiveSheet.Range("C5:" & "C" & nLastrow).Find(What:="B" & ii...
  14. K

    Called a macro I got Runtime Error 91: Object variable or with block not set

    Hi, I have a query regarding my code. I am not sure why am I getting this error when I am calling another macro. I found out that when I am at the MasterData sheet macro works fine. I suspect it there is some discrepancy with the find function and I like to know why. The highlighted debug...
  15. N

    VBA Calling Subs - Efficient?

    Hi Everyone, Not sure if this can be answered easily but here it goes: I've created a module in VBA where I've placed a sub macro containing: Sub BG_UpdatingOFF() Application.ScreenUpdating = False Application.Calculation = xlCalculationManual End Sub Sub BG_UpdatingON()...
  16. B

    Calling a function

    I've got a code that searches a loads database, takes the numbers and puts them into a calculator, gets a number from the calculator and then adds that factored load to another database. To perform each of the major steps in my code, I call a function. Now when I call each function in order...
  17. CsJHUN

    run a "call " when opening a workbook for edit

    Hi guys! I have a private sub on "thisworkbook" Private Sub Workbook_open() Call module.macroname End Sub It is a password protected wb for edit. (So if you didnt give the password when opening you can only read and can't save the file) I want to edit this privatesub for dont run that "call"...
  18. M

    Running VBA on workbook B from VBA in workbook A

    Hi All, I am stuck on an intermediate level of VBA that I cant work out. I have a set of workbooks (Called Set B) that use some BeforeSave VBA to shrink themselves down to a more manageable size before they are saved. I have another workbook (Called Set A) that uses VBA to loop through all of...
  19. J

    Worksheet_Change issues

    Hello eveyrone! New to VBA and this forum (thanks for having me!), but encountered a weird issue with Worksheet_Change. So I have a protected worksheet that I unprotect when macros are running. There are 3 fields where I'm checking for changes. But I'm having an issue with cell E2 where there is...
  20. T

    Hide/Display rows based on Dropdown Value

    The spreadsheet we use at my office is clunky in a number of ways. I recently joined the company, and I'm trying to clean things up for them. I dabble in Excel, but I'm no guru, which is why I need your help. We use Excel 2010. Right now in the model, the team can look at up to 225 sites for...

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