vba

  1. C

    Excel for Mac Crashes when I protect Sheet, and run a macro.

    I"m running a MacBook Air M1 OS 14.1. I'm running MS VBA 7.1 I'm using Excel for Mac Ver. 16.7 Office Home & Business. The issue I have is when I run a macro when the sheet is protected it will crash. When the sheet does not protect it the macro works fine. I protect the worksheet and I don't...
  2. T

    VBA Code - Copy last column & Insert Copied

    Hello all, Been an avid follower the recent months looking to create a tracking sheet that delineates to the right after each ending week passes. The tracker has been made and now wanting to introduce a module with the intent to automate the the storing of tracked data. The code I'm looking...
  3. P

    How to pass variable between subs that are stored as array element through CreateObject("Scripting.Dictionary")

    Dear all, I have the below code which uses Dictonary object [CreateObject("Scripting.Dictionary")] to get the unique string name and number of occurrence of the specific string. [ Sub CountUniqueStrings() Dim lastRow As Long Dim dict As Object Dim cell As Range Dim...
  4. J

    Filter Pivot Table Generated From PowerQuery Data Model

    Hi, I have a pivot table that was generated by using a power query data model. I have a filter on the pivot table called "EmpName" and I would like to iterate through all the EmpNames in the filter, copy the resulting pivot table data to a new workbook and save it as an entirely new workbook...
  5. B

    Add new Row in ListObject Table with data from an Array

    I have a Table, with 144 columns, consisting of strings that I convert to Formulas in another Table. Work around for Volatile function Indirect when I add and remove Sheets, but need the Formula NOT to go #REF.... SO - I have an 1 dim array and would need each data to be written/saved in a new...
  6. SanjayGMusafir

    VBA to add new record - Declaring variable

    Hi Experts I was writing following VBA code to add a new record. But it's constantly giving 'Type Mismatch' Error with variable x4 The new record has to be "A 1111" (A + space + 4 digits next to last used) I must be missing some trick. Also, I'm thinking of VBA to ask how many records to add...
  7. L

    Code in excel VBA to refresh SAS tables instead of pivot tables

    Hi. I am trying to do a Code in excel VBA to refresh SAS tables instead of pivot tables. I have some tables that contain data and are connected to Statistical Analysis System (SAS) and I need to refresh them. I am using this code to refresh everything once but sometimes it doesn’t work: Sub...
  8. C

    Running VBA macros for Excel via .bat file

    Hey all, It's not exactly related to VBA and excel, but I hope this has enough relation to it. I wrote a .bat file. The purpose of this .bat is to watch a folder for new files, and if so, call a VBA command. :loop dir /b "%folder%" > nul 2>&1 if errorLevel 1 ( timeout /t 30...
  9. M

    Share excel file on Sharepoint using VBA

    I am working on a VBA file that has a button, which should upload some data from an Excel file to a Sharepoint file. The problem is when the Sharepoint file is open it takes 2/3 times to run it to upload the information. But I want the data to be uploaded whether Sharepoint is open or not. This...
  10. I

    When Checkbox clicked > Send mail

    Hello, I am very new to VBA and trying to find out how to make this work. So basically I have a Checkmark from D2 to unlimited. When Checkmark is clicked > Display Message I have the following code written so far but I don't know how to display my message without having to run the...
  11. C

    Delete Cell Range, or Add Range and Copy Formulas etc. - Excel VBA

    Hoping someone can help. I have a worksheet that i need to remove or add a cell range(s) (red border area) from the 1st row down the column to a specific point (Stop Line) which can change dynamically. The more ID's added or removed in the rows will push the Stop Line down or up. Also, the more...
  12. 9

    How to Freeze Panes at a Specific sheet

    I have 5 main sheets and want to freeze pane lines starting from sheet 6, row 7, column 2. What do I have to do? Thank you.
  13. V

    run vb-application to search string in the table to "score"

    I have 3 tables: Table1- for First data (dynamic data, get from other sheet) Table2- Reference to get "score" Table3- Final result "score" We need to read first var in Table2, compare with first var in Table1, then do some compare like folowwing (I have them inside sheet attach) Step 1...
  14. Sumeluar

    Input box with selected text from cell

    Hello excel experts, I need your help with the following: I have a range named "Database" with about 5000 entries and growing, on the same worksheet I have a small calendar that populates tasks according to the current month and date from the database, this calendar places items for each date...
  15. S

    Macro runs different when stepping through code

    Greetings, recently I programmed a macro thats supposed to print labels via our Dymo LabelWriter 450. It needs a special pagesize setup in VBA in order to work: With ActiveSheet.PageSetup .PaperSize = 220 End With Where 220 is the index of the pagesize for this printer. I...
  16. G

    VBA - Copy and paste loop, with results

    I have a table with many values (lots of rows) and I have to copy values from each row (highlited in yellow) in some specified cells. Each of those rows will give me a result which I have to copy in another cell. Once this process is done i have to repeat it for each row of the table. The...
  17. Guna13

    How to Efficient way for create Multiple Workbooks

    Hi Team, We have a requirement to create multiple workbooks containing one-line questions and answers to share with our internal supplier team. We are looking for a fast and efficient way to generate these workbooks. Can anyone provide guidance or suggest techniques to streamline this process...
  18. B

    Macro code changing date format

    Hi to all of you, I have an excel sheet with an Inputbox, where i'm asker to put the number of the month, the year and a third value. Problem is, it was working as intended during 2023, but now, it's swaping the month for the day. I'm in Europe, we use dd/mm/yyyy and I'm trying to make the...
  19. C

    Getting rows and columns from range object

    I have some data in a spreadsheet, and have used VBA to create a dynamic range object from this data like so: Dim ws As Worksheet Dim rng As Range Set ws = ThisWorkbook.Sheets("Sheet1") Set rng = ws.Range("A1").CurrentRegion I am new to VBA, so I don't know exactly what this range object is...
  20. A

    Need VBA to automatically copy paste rows based factory selected

    Currently working on a project and been browsing through the forum last 2 days to find a solution to the problem. I am very new to VBA. thus seeking help for a full VBA code. I would like to develop a VBA code which copies rows from table sheet1 (source file) based on" Factory" selected in the...

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
Back
Top