1. K

    10 Buttons (Shapes) only first 9 work. #10 does not.

    I have a POS that is using 10 Shapes (Categories) as buttons. I have a Macro to call the Subcategories. It works for 9 of the buttons, but not 10. Sub POS_LoadSubCategory() With pos 'Remove any existing product shapes For Each ProdShp In pos.Shapes If InStr(ProdShp.Name...
  2. Chris_010101

    Macro to clear filters

    Hello, Sub Reset_Filters() ' ' Reset_Filters Macro ' Resets all filters ' ' ActiveSheet.ShowAllData End Sub If there are no filters applied, I am getting the below error message when the macro is run (it's assigned to a button): And when I debug Kind Regards
  3. L

    Macro code to format a row with italics and strikethrough text if cell =0

    Hello, I am trying to write a macro but I'm getting stuck as I keep getting an error. What I want to happen is looking at my range A1:P1000, if P1 = 0, then format the whole row (A:P) with italics, strikethrough text, and grey background. And etc for P2, P3, etc would format THAT row. This is...
  4. Jyggalag

    Debug error with macro

    Hi all, I currently have a macro that saves my sheet as a PDF, however when I try to do this, it brings me this error: If I debug it highlights this in my VBA code: The code is this: Option Explicit Sub SaveFileWithMacro() Dim Path As String Dim fn As String Path = "R:Path\PDF files\"...
  5. O

    Variable not allowing Match function to work? VBA

    Hi there, I wrote a script that connects to SAP and executes different tasks. A lot of the code is related to various SAP transactions, fields and functions, so the code won’t make much sense or be particularly useful. However, I will share the code that is giving me trouble and do my best to...
  6. Jyggalag

    Refer to range in VBA Excel (macro)

    Hi All, I am having an issue in Excel. My current setup looks like this: However, if I put range("O2") it works fine and it sends out the email to my email address. But once I try to increase the range and make it send out to multiple emails, it comes with the following error (highlighting...
  7. M

    ExportAsFixedFormat - After Publishing As PDF, The Excel File Freeze For a Long Time

    Hello, I used ExportAsFixedFormat Function to print my 50 tabs as PDF. Right after publishing those tabs as one PDF, the excel file freezes. By the time excel freezes, I already obtain the PDF file so the problem starts AFTER saving it as PDF file. I suspect that the excel calculates the whole...
  8. 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...
  9. 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...
  10. 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...
  11. 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...
  12. 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"...
  13. 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...
  14. 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...
  15. 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?
  16. 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!
  17. 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...
  18. 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...
  19. 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"...
  20. 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...

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