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