debug

  1. Rijnsent

    Overflow - why?

    I'm a bit stumped: why does VBA behave like this? See the Sub below: when I simply Debug.Print 60*24*2*60, I get an Overflow error. So apparently VBA treats that multiplication as an integer and therefore fails as it's too big. But why do the tests after that fail and why do the last two...
  2. 7

    VBA - really no solution for effectively debug locked code?

    Dear VBA experts and fans, I created an excel system that is full of VBA code and we give it to the client - with the code locked for viewing. Of course, there was soon a request that the client encountered an error, so I put "bookmarks" into the whole code - I divided the code into parts...
  3. S

    new in macro

    Hi all, i am just started to use macro recently , and i face issue after creating the macro it worked fine for few days then it bring Debug error message although i didn't make any change in it, any advice?
  4. S

    debug print help

    If I wanted/hoped to have a screenshot of the exact error (specifically the highlighted line) of code and to save it in a file on my desktop. I am not exactly sure how to do this and was hoping I could get some help. Thanks!
  5. C

    Excel Debug

    Having an issue trying to debug someone's work, don't know this style of coding well and so not sure what is wrong here exactly but the error it says is user-defined type not defined, and I tried fixing this by defining it as a different declaration and that didn't work. ' Connect to the...
  6. M

    Debug tabs name to correspond with cell value.

    Hi, I have this code that worked in another program but now that I use it in a new one, it converts all the tab names to dates except for the last three ones. The only thing that I changed was the tabs number. The old one was from 11-22 this one is 9-20 Private Sub Worksheet_Change(ByVal...
  7. O

    IF AND OR combo

    I just cannot seem to get this right today. I'm trying this: =IF(AND(E4=0,D4>0)*OR(C4>D2),"New",IF(AND(E4>500,D4>500),"Mature","Winding Down")) Not giving me what I want. I want if E4=0 and D4>0 or if C4>D2 to give me "New". If E4>500 and D4> 500 give me "Mature" otherwise "winding down"...
  8. J

    Worksheet change events stop working after Debug?

    Hi, I'm sure some of you have come across this. If for example I have a worksheet.change event that writes values to cells. Then for any reason I get a debug error in VBA. The worksheet events stop working until you close/reopen the workbook (well the only way I know of) Anything I'm missing...
  9. R

    Code works in debug mode but fails to run in compile mode

    Hi all I am writing a VBA code to copy charts from Excel to Powerpoint. The code is running fine in debug mode, however, gives an error in compile mode. Can anyone please help? Thanks in advance. MBSheet.Activate MBSheet.ChartObjects("Chart 1").Chart.ChartArea.Copy mySlide.Select With...
  10. S

    Macro Debug Error (Deleting a row)

    Hello, I want to delete all rows if column N reads "NULL". I was given the last two lines of this macro a while back from someone (I believe from this forum) and it has worked in the past. I applied this to my current macro but I am getting a debug error when I get to the last 2 lines. Can...
  11. W

    Run-time Error 1004

    I have copied VBA code from the internet and edited myself to create some invoices, Every time I run the code I get the above error and ask me to debug. Can someone please help me??
  12. B

    Sort leading to debug error... any thoughts?

    I have the following code working as part of a macro without any issue... of course, when I get to my client, I get a debug error... The topRow and botRow variables are storing numbers and in debug mode, when I hover over them, the correct numbers are showing. Any thoughts on a better way to...
  13. J

    VBA Causing Debug Issues

    I am using the below code. However, when I delete any contents from any cell I am getting a debug error. Can't figure out why. Private Sub Worksheet_Change(ByVal Target As Range) 'search If Target = Range("Q11") Then If InStr(1, Range("Q11"), "Search") > 0 Then Search End If End...
  14. I

    Change all to proper case using VBA - Office 365

    Ok so I am trying to automatically have my form in excel change things to proper case when entered. I found a code that works but then seems to crash excel or kick me to debug here is what I have please help in fixing it so it works. Private Sub Worksheet_Change(ByVal Target As Range) 'Update...
  15. E

    Run-time error 1004 - No cells were found

    Hi all, Hoping someone can help! When running the macro below, I am getting a run-time error 1004 - No cells were found error. I have tried diagnosing this issue myself, but am at a loss. This macro worked perfectly on the worksheet it was originally created on. So I used that worksheet as a...
  16. E

    Runtime error 1004 when running a macro

    Hi everyone, When running a macro, I am getting the following runtime error: Run-time error '1004': Method 'Range' of object '_Worksheet' failed When I click 'Debug', it takes me to the line of code that isn't working, which is highlighted in blue below: Dim ary As Variant Dim i As Long...
  17. H

    Debug error

    My spreadsheet takes totals and subtracts totals. I have about 6 columns and rows that are filled with data. If I try to insert a new row I get a debug error. The debug highlights "Application.Undo" Not sure why any suggestions? Private Sub Worksheet_Change(ByVal Target As Range) 'copies the...
  18. B

    Correcting Debug '424 Error'

    I created the following code below and attached it to a button allowing me to enter a number into Cell A3, click my button and it displays the needed information from another worksheet. Overall it works, but I continue to get a "Run-Time error'424'" msg. What am I missing? Sub ShowDispo()...
  19. A

    Show a string by index part of name

    I've some strings called "MyEncode1", "MyEncode2", "MyEncode3" etc and passing 1 2 or 3 to a function (as n), wanting to see the one corresponding to n. It won't work! I can go to the immediate window and debug print e.g. MyEncode2 fine but debug print MyEncode & n fails. There's probably a...
  20. A

    Macro runs into "object required" error, please debug.

    Greetings All, I am unfamiliar with VBA so reaching out to anyone who can help me debug why the macro named "Sheet2.ShowMembership" runs into "Object required" error message when fired? The macro in question basically turns column A & B (last name & first name) into bolded text with yellow...

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top