1. X

    Repetitive Code Elimination

    Hi, the below code copies from one workbook a few different ranges in one workbook and pastes them in another workbook. It works so my skill set says repeat the same code, change the tab names in the code for the other 20 tabs. Is there a better way to repeat this code so it captures all the...
  2. S

    VBA code to auto adjust cells

    Is there a vba code which can adjust the cell whenever we put a line break alt+enter and adjust the cell such that the data before line break is only to be seen
  3. M

    Save a macro file in a new file without the macros

    I am stuck. I need to save the file without macros and attach it to an email/ I cannot get any of your examples to work/ If you have another option, I will take it. Dim OlApp As Object Set OlApp = CreateObject("Outlook.Application") Dim NewMail As Object Set NewMail = OlApp.CreateItem(0) Dim...
  4. D

    Create macro that sends out emails when quantity is less than or equal to minimum stock

    Hello everybody, My current excel-file looks like this: I would like to create a macro that, once I click on it, checks if the quantity is less than or equal to the minimum stock. So in the photo, for row 2 where material number "6046100" has a minimum stock of "1" and the quantity on the...
  5. E

    Macro to copy tab from closed workbook not working

    Hi all, The below code doesn't seem to be working: Sub CopySheet() Application.ScreenUpdating = False Set closedBook = Workbooks.Open("C:\Users\040429\Documents\Workings\Excel\_Holidays_.xlsb") closedBook.Sheets("Holidays ").Copy Before:=ThisWorkbook.ActiveSheet...
  6. s_macloskey

    Protect/Unprotect worksheet VBA BUTTON?

    Hello all, context: I have created an employee holiday/leave sheet on (we use Excel 365) I have made a sheet for each month and they require 'protecting' and 'unprotecting' seperately/individually - with a password query: My team is not so computer literate so, I need to create an easy to...
  7. D

    Convert Excel to PDF before sending out automatically by email

    Hello Everybody, I am currently trying to create an Excel macro that converts my excel sheet into a PDF file and then sends it out by email. My current macro can do this, but it cannot convert it to a PDF file. I tried to merge my current VBA formula with the one here: to convert my excel...
  8. A

    print HEX code as color in excel sheet

    Hello I have searched and attempted to implement many various macros to do what I am looking for, but I have not been successful. Could anyone give me an excel sheet that has the macro already setup for doing the following. I have a list of HEX codes I am using for a bar plot in R I want to put...
  9. T

    Macro to copy rows from various sheets to the master sheet. Rows filtered by input on the master sheet.

    Hi All, I've been searching various forums for days with an answer to my issue without success. I've found answers that partially work, but don't quite do what I want. I'm pulling my hair out and would appreciate any help. I currently have a workbook which pulls in raw data from hundreds of...
  10. A

    Running macro after data retrieve is slow

    Hi All, I have a MS SQL stored procedure returning data to excel. After retrieval I carry out some actions using a macro. When I run the query and then run the macro, the macro takes a long time. If I run the query save, close and reopen the workbook and run the macro first, then it executes...
  11. E

    How to copy (with a macro) formulas from a row down based on if values exist an that row on another tab.

    Hello again. I need to copy a row of formulas from a specific row (Row 16) down but only if there is data in a specific filed on another tab. To explain a little bit better. Some people fill in data on a specific tab (Tab 2) Other people fill in data on tab 4 My formulas concatinate and/or...
  12. B

    Pop up box Macro - Expired dates, and specific text

    Hi all, New to doing Macros, and really not sure where to start, as what I've been trying doesn't seem to work very well. I have a spreadsheet with a number of review dates, these are in columns K, S, V, X and AA, I am trying to make it so when these are equal to or past todays date, a pop up...
  13. F

    Select Value on OLEP Cube

    Hi To all, I am kind of new working with OLEP Cube, I Record a Macro with Macro Recorder that works nice, but I need to substitute a Value with an User Entry, This is the original Code that I have that works Fine ActiveSheet.PivotTables("PivotTable1").PivotFields( _ "[Profit...
  14. A

    UnZip all files in specific folder

    Hello guys, I have a code where it will unzip specific file based on file path provided. But I want to unzip all zip files present in the folder. Public Sub Unzip() Dim localZipFile As Variant, destFolder As Variant Dim Sh As Object localZipFile = "C:\folder\path\"...
  15. S

    Tricky budget sheet code

    Hi, I have created a custom budget sheet that we will be using in our organisation and have hit a road block with what I would like it to do next, and hope that someone may be able to offer some help. I have scoured the internet and tried to work this out but my knowledge is limited! Thank you...
  16. M

    Macro to move date in columns to ensure there are no blank rows

    Hi there, I have a excel sheet which is almost 11k lines and 11 columns big. Within the columns data is populated sporadically in the rows and I want to be able to bring this data into a defined structure. The defined structure is that Row 2 will be completed across all columns where there is...
  17. M

    UserForm not finding multiple entries

    I was looking for a code that will help me look for multiple/dupes in a worksheet when entering information from a userform. I struggled with this and searched google high and low and used the code: If IsError (Application.Match (Me.NameTextBox, Worksheets("Admin").Columns(3),0)) Then MsgBox...
  18. bepedicino

    End Macro if Range is Blank

    Hello, I am hoping to get some VBA help to end a macro either before or after the copying if the selected range is blank. Here is the current VBA I have in please. Sub CopyRange () Range("A2").Select Range("A2:G2", Range("A2").End(xlDown).End(xlToRight)).Select Selection.Copy...
  19. R

    Disable enable drop down based on another drop down

    Hello Everyone, I have three drop down at A1 B1 and C1 A1 has value, Apple, Boy and Cat i want if A1 has apple, B1 drop down enable and C1 should disable if A1 has Boy then B1 = disable and C1 = enable if A1 has cat then B1 and C1 should enable Please help.
  20. G

    Yes or No MsgBox in VBA Macro

    Hi all you wonderful Guru's, I have a Macro with several calls within. How do I place a message box in before the last call to either yes run the last call or no to end the macro right there? Call Macro1 Call Macro2 pop up a msg box yes or no to either continue to the next call or end the...

Some videos you may like

This Week's Hot Topics