Hello,
I'm having some trouble figuring out how to get a Private Sub to return the values it processed received from a Public Sub. Everything works fine when the Subs are NOT Private Subs.
NOTE: I'm trying to avoid placing them all in a single module. I'm doing that already for one Sub - this...
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...
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...
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...
Legacy 456155
Thread
access
application.run
callbyname
getters
maintaining state
property let
property set
setters
tempvars
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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***"...
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...
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...
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.