application.run

  1. D

    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...
  2. 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...
  3. M

    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...
  4. 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...
  5. JTL9161

    Application.Run

    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...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. 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...
  15. 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***"...
  16. 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...
  17. Roderick_E

    Application.run

    I'm running subroutines from another subroutine by using Application.run <string> such as Application.run testmacro The problem is, there is no error if the macro doesn't actually exist. I could just as well add Application.run thisisbogus and it would appear to do something even though it...
  18. 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...
  19. 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...
  20. Jaafar Tribak

    Application.Run .. (Argument Passed ByRef)

    Hi all, As you know, when passing an argument ByRef the Callee procedure code can change the value underlying the argument in the calling code as shown in the following example : Sub Caller1() Dim X As Long X = 1 Call Callee(X) MsgBox X ' returns 2 End Sub Sub...

Some videos you may like

This Week's Hot Topics

Top