1. Y

    For Loop, If Statement, and CountIf (Cutting down run-time)

    Hi all, For each cell in column B, I want to count how many cells in that column have the same value. If there is only one cell in the column with that value, change the Cell.Value to Cell.Value & "a", if there are two cells in the column with that value, change the Cell.Value to Cell.Value &...
  2. G

    Paste value once

    I have this VBA, however, when I run it, it repeats until I get a runtime error. I am trying to get it to where it pastes the cell's value if it reaches over a text limit. The limit would be 20. This cell(A2) has a card scanned and pastes the values of the card in the cell, instead of clicking a...
  3. S

    VBA Code Runtime Error

    I'm using the following formula in a cell =IFERROR(INDEX($A$1:$A$33,AGGREGATE(15,6,(ROW($A$1:$A$33)/(($B$1:$B$33>=$I$1)*($B$1:$B$31<$J$1))),ROWS($A$1:$A2)-ROW($A$1))),"") It works perfectly. If i enter the same formula in my vba code, I get run time error. How to correct it. In vba code i wrote...
  4. W

    runtime error '-2147217900 #80040e14#'

    Hello, I've been trying to retrieve some data from an Access database, but I'm getting the above error message followed by 'Syntax error in ORDER BY clause.' Sub LookIntoAccess() 'This macro opens the Database From Excess.accdb database, creates and runs an SQL query. 'Then, it copies...
  5. P

    runtime error '380 Could not set the rowsource property. Invalid property value

    Private Sub UserForm_Initialize() ComboBox1.Value = "Please Select an employee from the dropdown" ComboBox1.RowSource = "Sheet1!A3:A" & Range("A" & Rows.Count).End(xlUp).Row End Sub Why won't this code populate my combobox? It worked for the person in the YouTube video. Thank You
  6. R

    Excel Vba Runtime error 453

    I am continously facing this problem runtime error 453.Please help to reslove.
  7. H

    Creating Userform Controls At Runtime

    Good morning I am adding controls at runtime to a userform. I have done this before and I cannot work out what I am doing differently this time. I can add the controls alright and I can add the event handler code in the form module programatically. The form loads alright but the event...
  8. J

    Use VBA to install Excel Microsoft Scripting Runtime Reference

    Hi all! I'm trying to activate the Microsoft Scripting Runtime Reference within my code as I'm using FSOs in other parts of the code. I don't get any errors, but it's not activating the reference either. The path below is my actual path. Any help is appreciated. Thanks in advance! Sub...
  9. K

    Runtime Error -2147417848 (80010108) Automation Error

    Getting the following error: Runtime error -2147417848 (80010108) Automation Error The object invoked has dicsonnected from its clients. <code><code> Set ie = CreateObject("InternetExplorer.Application") Application.ScreenUpdating = False If Sheets("Adrenalin").Range("C3").Value = "" Or...
  10. G

    Remove Formatting Runtime Error 1004

    Not the best or brightest using VBA but I've done this a 100 time before but now it's giving me grief. Keep getting runtime 1004 error. This is driving me crazy so any help would be appreciated. Thanks, Dim wc As Worksheet Set wc = Sheets("ABC") wc.UsedRange.Value = wc.UsedRange.Value
  11. C

    Runtime Error 1004

    Trying to pass data from a form to a sheet...getting runtime error 1004 and have no idea why... Can someone take a look and tell me here I am going wrong? Private Sub cmdupdate_Click() Dim wsadd As Worksheet Set wsadd = Sheets("Historical") Dim Rw As Integer...
  12. P

    Runtime Error 9

    Hi guys. This is a strange one. A colleague of mine keeps getting a runtime error 9 whenever he tries to run a vba code. The code opens up a second workbook and looks to activate the relevant workbook when appropriate. The code is Sub NormalWeek62() TheFirst = 0...
  13. B

    Need help with runtime error 6 overflow

    Hi Everyone, I am getting a runtime error(runtime error 6 overflow) when selecting ALL cells in a worksheet. This sheet has a pop up calendar referencing cell J3. Debug shows the error in the second line of the code below. Any idea why? Thank you! Private Sub Worksheet_SelectionChange(ByVal...
  14. H

    Runtime 1004 - expected no data error

    Hi All I am applying a filter to a column where sometimes no data will be found (as expected). Can someone help with code to step past the 'Runtime 1004' error so the macro carries on? Thanks Selection.AutoFilter ActiveSheet.Range("$A$1:$Q$2000").AutoFilter Field:=13, Criteria1:=RGB(204 _...
  15. A

    Runtime error 1004 unable to set the weight property of the border class

    Hello All, I am attempting to insert N number of rows based on N being inserted in cell "D7" Rows are to be inserted at A10, with the formatting (borders) extending to D10 This is the code i have so far but I keep getting the error message "Runtime error 1004 unable to set the weight...
  16. C

    Puling data from matched date, time & machine name

    Hello, I have a measuring device on 4 x machines which measures run time in minutes and metres of material run through the machines. The measuring device outputs the data into Excel but the format isn't great it displays as: Date, Time, Machine 1, Runtime Date, Time, Machine 1, Length Date...
  17. bs0d

    ActiveX Listbox - Items disappear after click while code is running (then reappear when complete)

    I have an ActiveX listbox on my sheet. I have a number of sub routines that run once the user clicks an item in the list. My issue is that once a user clicks an item in the list, the listbox appears empty briefly while the code is running, and the items show back up when the code is done. This...
  18. Q

    Macros Runtime Error

    Hi, I have been trying to run macros from my source file to run on my target file. I even selected use "relative reference", however every time I start to work on my file it gives me a runtime error code 1004. I understand that is because it cannot source the reference data. When I debug, it...
  19. S

    Runtime error subscript out of range

    Greetings, I am running a chunk of code that uses a loop. Dim A As WorksheetDim B As String For Each A In Sheets(Array("sheet1", "sheet2")) B = A.Name I am receiving the error in the title on the For Each loop line. Is the For Each loop structured correctly, or might I just have an...
  20. P

    Update Ribbon Editbox in runtime

    Hi Is there a simpleway to update my Ribbon Editboxes from cell updates during runtime. I can seesimple ways to populate editbox when opening a Workbook, and updating a cellfrom the Ribbon Editbox during runtime. I cannot see a way to update the ribboneditbox on cell change? All...
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

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