debug error

  1. R

    Excel Loop to skip "Hidden Files"

    Hi all, Full disclosure, I am still learning VBA, am not very good yet, and hoping someone can help. I currently have a script (not written by myself) being used at my office. It used to run fine but now is throwing an error because it is picking up a file called "thumbs.db". After some due...
  2. Z

    Help Debug Issue with Macro Code

    I am using the below code to cleanup a bunch of workbooks. I came across a workbook that does not have any data inputted below row 1. Row 1 contains the headers. The macro keeps throwing the generic error "Run-time '1004': Application-defined or object-defined error". Clicking the debug issue...
  3. B

    VBA EXCEL. Run time error '13' type mismatch

    Hi All, Having a slight issue, the code I have below works ok if I change each cell in column A individually, however if i try to copy and paste the Target Value over multiple cells in column A I get a run time error '13' type mismatch. I've highlighted the code where it "debugs" :eeek: If any...
  4. L

    Encountering a Debug error code on first use of a macro but then it goes away?

    "Run-time error '1004': PasteSpecial method of Range class failed" This occurs on the first use of a macro I use in a work book that maintains a pretty large database whenever I make changes to the macro. It only occurs once and then it is no longer an issue. I can close and reopen the...
  5. A

    Debug VBA Comparing two Sheets

    Hello, I am using the following code that I found on another forum to compare two data sheets. Whenever I run the code though, it comes up with an error message "Run-time Error: 13 Type: Mismatch" for the line that is highlighted and underlined. It will highlight the differences in Excel, but...
  6. H

    Help Modifying Macro - Naming As Contents Of A Cell

    Hi all, I have the following working macro below. Sub Button1_Click() ActiveSheet.Unprotect "password" Dim wbNew As Workbook Application.DisplayAlerts = False Worksheets("Page4").Copy Set wbNew = ActiveWorkbook With wbNew With .Worksheets(1).UsedRange .Value = .Value End With...
  7. A

    Excel Crashes when I try to run VBA marco

    So I'm new to VBA and am having problems with this one marco. I have written it in two different ways to get it to work and I cant. Both the codes work but just take about 10 mins and sometimes it crashes. I am trying to identify the last time an item was moved in our inventory by using the...
  8. O

    Clear Form and Reset Toggles on Multiple Sheets

    I am trying to reset/clear multiple sheets in an excel document as well as resetting the toggle buttons to "True". I can get the information to clear from all sheets and the toggles to reset on the active sheet but can't get the toggles from the 2 others sheets to reset. My clear button is on...
  9. D

    Run-time error ' 1004': Application-defined or object defined error

    I'm trying to get the ROW number from a specific sheet where a cell value has been found. Cnt = 5 ID = 479 Row = 0 --> This should return 19 but for some reason it is returning a 0. My code is: Private Sub CommandButton1_Click() Dim ID As Variant Dim Row As Long Dim Cnt As Long Dim Analyst As...
  10. B

    Runtime error '13'

    I have a workbook that auto filters results in another workbooks based the value of a range. The code works great when only numbers are being used but when a letter is introduced into the cell, I get a RUNTIME ERROR '13', TYPE MISMATCH debug error. For example, the code works great if I use...
  11. B

    userform prompt if debug error

    is there a way to add a code to the whole workbook or to each code in the worsheet to if there is a debug error a userform I created will .show? My userform I have created is report errors form that is tied into outlook, it emails me if someone submits a problem. Right now, it only comes...
  12. M

    Macro Sort

    Hi Guyz, Been recording a macro that sorts different columns at a time but after recording it and tried the macro, it always give me an error and does not do the sorthing. See below part of the code where it gives an error. Please help. Thanks a lot. Text in bold is the one making the error...
  13. B

    Debug error on one PC but not another

    I am getting a frustating error here at work...I have created a spreadsheet that runs fine on my machine but not another. The specific line of code that appears to be stumbling on is... If eomonth(Range("Date_To"), -Range("Period_DownMonths")) < Sheets("Monthly_Returns").Cells(6, 1).Value...
  14. J

    VBA Question - Excel

    Hi, My friend created an excel file using VBA so that I could manage my investments, there is a macro that I use to enter a transaction, it would take the details I enter, like ticker, number of shares sold and transfer that data into another excel tab. It has historically added the...
  15. P

    ActiveSheet.paste Link:=True

    Hello, I have a macro set up so when a command button is selected it will past whatever is on clipboard. My problem is if nothing is on clipboard and command button is selected I get the DEBUG errror. Can anyone tell me what code I could put in there so If nothing is on clipboard and button...

Some videos you may like

This Week's Hot Topics

Top