1. P

    VBA Application.Run for Running Macros-with-Parameters Stored Inside an Excel Cell

    Aim: To Loop Through Cells Containing Macro Names and Run Those Macros via Application.Run Issue: The code used to loop through cells and run macros works perfectly only for macros without parameters. For those macros with parameters, it fails. Problem in Detail: I have stored a few macro...
  2. L

    Strong typing TempVars

    Hello. When developing, I have found it convenient to use TempVars because they maintain state even when my VBA project does not. In addition, I don't have to run a load procedure every time I restart my code. To provide a bit of validation and intellisense, I wrap them in properties in a...
  3. tlc53

    VBA - Run macros over all sheets, not referring to workbook name

    Hi, I've finally got everything working how I need it to (thanks to the people on here!) and now I'm at the last hurdle. From my Dashboard sheet, I then want to select each sheet and run the necessary macro. Once done, it takes me back to the Dashboard. The problem with my code below, is that if...
  4. MrDB4Excel

    Autorun a macro upon opening of excel file

    I am trying to get a macro to autorun when I open a workbook. I want this macro to run automatically as soon as I have selected the "Update" selection that appears in the "This workbook contains links to one or more external sources that could be unsafe." Obviously these sources exist only on my...
  5. T

    Is there a way for me to find if this ( Application.Run "AdaptCaption" ) does anything?

    I'm updating a macro that is used at my job that was created by someone that is no longer with the company and at the very bottom of the macro there is 2 application run lines: Application.Run "AdaptCaption" Application.Run "ReSaveWorkbook" There are no other macros in workbook and I've...
  6. JTL9161


    I have the below code at the end of a macro after switching from workbook (A) to the MMDDYY-SGCS workbook. The entire macro runs in WB(A) then the code below switches to the MMDDYY workbook. Windows("MMDDYY-SGCS.xlsm").Activate Sheets("Sheet1").Select Range("B2").Select 'Application.Run...
  7. W

    Call a Macro from another workbook

    Hi there - just wondered whether someone could help me as my brain is currently fried .. I have a workbook named KPI_DASH. This collates data collected from various other workbooks i.e BookA. The KPI_DASH workbook is hidden to the user and they wouldn't open it. Within KPI_DASH is this...
  8. B

    Help locking a macro after its been run

    Hi Everyone, Not really sure how to do this but I have a macro assigned to a button in a worksheet. What I would like to do is AFTER the macro has been run, lock it until Workbook has been closed and reopened. If the button is clicked prior to closing and reopening display a message that would...
  9. K

    Added Macros together via Record need to loop at change in cell value

    Hello, I have merged several Macros together via the record button. What I want it to do now is to repeat itself at a change of value in column A. For example A1-A10 are the same I would want it to run for those. Then A11 is different, I would want it to insert a row and run again and so forth...
  10. L

    VBA Application.Run of Private Sub Issue

    As usual, this is probably a simple answer, but it is stumping me. I have a couple bits of code that have used for years to ProtectAll, UnProtectAll the sheets for templates. (They are private subs.) That way when I have code to run data imports, etc. I can usually just run the UnprotectAll...
  11. X

    Calling a macro with a variable from “Personal.xlsb”

    I have a macro in Personal.xlsb called Public Sub Get_Name(shName As String) When I use below sub to call Get_Name from Personal.xlsb, I get an error at the Application.Run "Personal.xlsb!Get_Name(shName)" Public Sub Set_Name() Dim shName As String shName = ActiveSheet.Name...
  12. M

    I need to shorten my macro.

    Hy guys, I'm a noob in macro's, but i can't figure it out, with forum and record function. I'm starting to apologise first on my english, because i'm canadian and french :-) loool I got a totaly fonctional macro, but it's very very very long. I'm pretty sure you guys expert, can find a way to...
  13. V

    Refresh worksheets on open force any macros to run if required

    Hello, I am working on a Workbook_Open formula. Right now the formula works, but it's not forcing Sheet 11 & Sheet 12 to do something. Normally on those Sheets once you click V6 (which is a data validation drop down list) it activates a VBA code for Worksheet_Change which tests if V6=V2 on the...
  14. U

    Running Macro from another workbook when Application.Run doesn't work

    I have been using the Application.Run for a while but something changed and now it won't work! The only thing I changed is that I added the same command in another section of the procedure and I tried to use a goto to run this code but it skips the Application.Run without an error. Anybody have...
  15. O

    VBA Round a Calculation

    Hello, I've written the below code to leverage Solver. I'd like to RoundDown the answer the code churns out but have been having trouble getting it to work. I've been trying to leverage Application.WorksheetFunction.RoundDown, but can't seem to get it to work. Any help would be greatly...
  16. C

    Block Error without End If

    I keep getting this error when running the following code. Please help. Thanks Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("B1")) Is Nothing Then Dim myMSG As String myString = "***Processing Customer Reports***" mystring2 = "***Complete***"...
  17. andrewb90

    Code runs perfect until adding excel restart

    Hello all, I have a sub that works nearly perfectly, except that excel seems to lag after running. My solution to the lag was always close and reopen excel. I finally added that to the sub (using call at the very end) yet now the original sub does not run in its entirety. I'm at a loss as to...
  18. Roderick_E

    I'm running subroutines from another subroutine by using <string> such as testmacro The problem is, there is no error if the macro doesn't actually exist. I could just as well add thisisbogus and it would appear to do something even though it...
  19. R

    Solver not obeying non-negative constraint

    Hi Everyone, I'm quite certain this is a bug and there's probably no fix however I thought it would be worth asking. My issue is that even though I have the "Make Unconstrained Variables Non-Negative" box ticked, it's still using negative variables and crashing the equation! The solver works by...
  20. M

    Application.Run timing problem

    Hi all, I am writing a macro that has to open another workbook (wb2), run a macro in wb2, copy some data and paste it to the first workbook. However, given it takes some time for Application.Run to actually populate the excel cells in wb2, it seems like the macro i am writing selects the range...

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
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 "".
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