Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'll run it tonight and see if I can ascertain which sheet the error is
occurring on. -- R Ormerod "Jim Thomlinson" wrote: The queston becomes what is different about the sheet that the code crashes on from the other sheets. Is the sheet protected? Is there no data on the sheet? What are the values of MaxRowNet05 and a when the code crashes? Once we figure that out the rest should fall into place... -- HTH... Jim Thomlinson "R Ormerod" wrote: Sheets("xxxx").Select Dim MaxRowNet05 As Long Dim a As Long MaxRowNet05 = Range("E65536").End(xlUp).Row For a = MaxRowNet05 To 2 Step -1 If Range("E" & a).Value < "C10" Then 'Range("E" & a).Font.Bold = True ' For testing Range("E" & a).EntireRow.Delete ' Delete the row End If Next a The macro runs through around 10 worksheets with the same code. Each sheet is unhidden before and rehidden after the code. -- R Ormerod "Jim Thomlinson" wrote: Post your code. It is hard to debug that which we can not see. The error you have can be caused by a number of different things. The most likely culprest are that you are tryuing to select a cell on a sheet that is not active or that you are trying to select a cell which does not exist. Such as Cell A0 or A65537... -- HTH... Jim Thomlinson "R Ormerod" wrote: After running an Excel VBA macro the following error always occurs: Run-time error '1004': Select method of Range Class failed The 'Debug' button is not available and I have not been able to ascertain why this is happening - any ideas for investigating? -- R Ormerod |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2007 - error saving file & error loading dll | Excel Discussion (Misc queries) | |||
Error: "Excel encountered an error and had to remove some formatti | Excel Discussion (Misc queries) | |||
Counting instances of found text (Excel error? Or user error?) | Excel Worksheet Functions | |||
Excel 2003 Macro Error - Runtime error 1004 | Excel Discussion (Misc queries) |