call a macro

  1. 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...
  2. 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...
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. 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()...
  8. 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...
  9. C

    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"...
  10. 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...
  11. 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...
  12. 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...
  13. S

    If cell meets condition then run macro

    Hi all, I have an IF statement where I want code in a different macro executed when a cell is populated with a specific value. My code thus far is below: Sub RUNOPT() Sheets("Main Page").Select If Sheets("Main PAGE").Range("L15") = "A" Then Call RUNA If Sheets("Main PAGE").Range("L15") = "B"...
  14. N

    autofit wont loop

    hey all does anyone see why this code won't loop to the next open workbook...? it only does it on the current workbook ive selected, and therefore, cannot Call to another macro... ideally, i would rather just have all sheets in all open workbooks autofit from columns "B:Z" but that hasn't...
  15. D

    VBA Copy and Paste Isn't Working with Additional Sort Filters

    I was able to get help on this forum not to long ago on a solution that worked beautifully. However, I have tried to augment the number of routines. Essentially, what I am trying to do is run a series of sort & copy/paste to another sheet. The sorts are all well defined, but the copy/paste...
  16. K

    Running Macro from different workbook error

    I'm trying to call one macro using a macro in a different workbook. Both workbooks are open when I execute the macro. I'm using the syntax: Application.Run "MacroBook!MacroName" The error I get is Run Time Error 1004: Cannot run the macro 'macrobook!macroname' The macro may not be...
  17. T

    Calling a macro on worksheet_change

    Hi, I´m having problems calling a macro. Private Sub Worksheet_Change is located in sheet1 with the following code: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$c$5" Then Call Macro3 End If End Sub Macro3 is located in Module2 in the same workbook and works...

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top