macro - variables

  1. M

    Copying Values from Variable Workbook to Fixed

    Hello All, The purpose of the macro I am working on is to batch produce pdf customs documents, by copying the values from the variable workbook (it changes name every time I take a fresh download from the database), pasting them into the fixed workbook where the relevant customs info is...
  2. T

    Renaming Worksheet With Input Box

    I want to rename my 2nd worksheet in my VBA WorkSheets(2) using an input box. I want the user to be able to enter what the renamed sheet name freely. Issue is, I am new to VBA and this isn't as easy as the YouTube videos I watched made it appear. My current code giving me an error of "Compile...
  3. B

    Lookup Maximum Date and Corresponding Adjacent Value in Array with Column Specified by Referenced Criteria

    Using the Federal Reserve Bank of St. Louis' Add-In, I am able to download historical rate data for multiple different securities (10-Year Treasury, 3-Month LIBOR, etc.) This is incredibly useful because I can update this data with by simply running the macro and it gives me all the historical...
  4. L

    macro to check cell a, if =0 go to cell e, then run macro

    If cell A in row 1 equals 0 I need to run a macro from column E "AddLine" (which shifts cells from e thru end-right, down) If its not equal to 0 I need to continue to run it. This is what I have but it only inserts a whole row in row a1 then stops Sub MyInsertMacro() Dim myLastRow As...
  5. M

    How to run all variable on a macro

    Hi all, I have the current code set up with variable options on a masterlist. How do I make the macro to run for all variables? Thanks In advance for help, macro_ - '==========>> Option Explicit '---------->> Public Sub PassVariables() Dim WB As Workbook Dim SH As Worksheet...
  6. M

    Error in code with variable option

    Hi all, I am trying to create a variable option with my macro and currently have the following code. I have an error coming up at the beginning saying -sub or function not defined- Please help.. '==========>> Option Explicit '---------->> Sub PassVariables() Call Tester(myYear:=2014, _...
  7. M

    macro with variables

    Hi all, trying to create a macro with variables and have inserted the code at the beginning however haven't created a new sheet were I've listed cell variables yet.. I'm not sure wether I can create such a new workbook and if I can how to link it to this code. Also, not entirely sure if I have...
  8. M

    Creating a macro with variables

    Hi all, I currently have a macro that updates/saves a number of different data sets for a specific period. I need to be able to make it be able to update the data sets for various different periods.. how would I go about doing this? Appreciate any help whatsoever! Thank you in advance for any tips!

Watch MrExcel Video

This Week's Hot Topics

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 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.
Go back
Top