![]() |
Help with Debug issue
I have my macro set and everything works perfectly, but the Debug goes off
every so often and always at the same line. Can anyone please look at the macro below and tell me where I need to make a change to stop the debugger?? Private Sub Worksheet_Change(ByVal Target As Range) With Worksheets("June 13 - 2045875") <------------This is where the Debug hits Application.EnableEvents = False Call Sheet10.colortotalrow Application.EnableEvents = True End With End Sub |
Help with Debug issue
Hi
Check if there is a typo in the worksheet name. Btw: Always state the error message, so we know what to look for. Regards, Per "akemeny" skrev i meddelelsen ... I have my macro set and everything works perfectly, but the Debug goes off every so often and always at the same line. Can anyone please look at the macro below and tell me where I need to make a change to stop the debugger?? Private Sub Worksheet_Change(ByVal Target As Range) With Worksheets("June 13 - 2045875") <------------This is where the Debug hits Application.EnableEvents = False Call Sheet10.colortotalrow Application.EnableEvents = True End With End Sub |
Help with Debug issue
It gives the error
"Run time error '9 Script out of Range" The spreadsheet name is correct. "Per Jessen" wrote: Hi Check if there is a typo in the worksheet name. Btw: Always state the error message, so we know what to look for. Regards, Per "akemeny" skrev i meddelelsen ... I have my macro set and everything works perfectly, but the Debug goes off every so often and always at the same line. Can anyone please look at the macro below and tell me where I need to make a change to stop the debugger?? Private Sub Worksheet_Change(ByVal Target As Range) With Worksheets("June 13 - 2045875") <------------This is where the Debug hits Application.EnableEvents = False Call Sheet10.colortotalrow Application.EnableEvents = True End With End Sub |
Help with Debug issue
That means that that worksheet does not exist.
Either you have extra spaces in the middle, or the start or end - that's a typical problem. -- __________________________________ HTH Bob "akemeny" wrote in message ... It gives the error "Run time error '9 Script out of Range" The spreadsheet name is correct. "Per Jessen" wrote: Hi Check if there is a typo in the worksheet name. Btw: Always state the error message, so we know what to look for. Regards, Per "akemeny" skrev i meddelelsen ... I have my macro set and everything works perfectly, but the Debug goes off every so often and always at the same line. Can anyone please look at the macro below and tell me where I need to make a change to stop the debugger?? Private Sub Worksheet_Change(ByVal Target As Range) With Worksheets("June 13 - 2045875") <------------This is where the Debug hits Application.EnableEvents = False Call Sheet10.colortotalrow Application.EnableEvents = True End With End Sub |
All times are GMT +1. The time now is 02:17 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com