debug

  1. P

    Macro runs fully in debug mode, but partially only when played

    Hi, I have a simple macro to copy-paste formula over a range of active rows. I've used Dim statement to identify the last active row using worksheet countA function. And then written statements to copy formula from a specific location and paste in a specific cell for the active number of rows...
  2. D

    Run-time error "53": File not found

    Hello everybody, I am currently having a problem with one of my files. I have made an order form where people can order goods from. They download my excel sheet and click on a submit macro which sends out the excel sheet in a PDF file through email. This works perfectly fine when I do it...
  3. J

    Macro for creating a folder

    Hi I have below code for creating a folder in the same directory as the active workbook. The folder name should be the content of the selected cells when I run the macro. However, I get an error "Bad file name or number (Error 52)" on this code line when debugging: If Len(Dir(ThisWorkbook.Path...
  4. A

    Macro only works in debug mode

    Hello all, I'm attempting to run a macro over multiple workbooks which clean up, and add additional data into each workbook. For the most part, this macro runs correctly, however, one section will only run properly if stepped through in debug mode. If run normally it will have no effect. What...
  5. M

    Mega Quick VBA Amendement

    Afternoon all, Really quick one. I have some code (below) that generally works fine (to filter sheets), however, I don't want it to run on a new sheet called 'Summary' and I am getting a debug error. Can someone add a line to basically say 'ignore Summary sheet' and run only on "Sheet 1"...
  6. 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...
  7. 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...
  8. 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?
  9. 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!
  10. 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...
  11. 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...
  12. 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"...
  13. 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...
  14. 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...
  15. 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...
  16. 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??
  17. 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...
  18. 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...
  19. 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...
  20. 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...

Watch MrExcel Video

This Week's Hot Topics

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
Top