I have a Module that has worked for almost a year but is now not working. I've had to rebuild the worksheet because of a un-delete-able style issue that was causing confusion on the part of the end users. So I copied this module into the new workbook.
Here's a sample:
When I trigger "VehInv" the code works as it should and runs the sub "ClearOldData". However after ClearOldData completes, the Macro stops and never returns to VehInv to run the next step.
I've tried checking VBA's Options and Reference(Library's.) Can anyone tell me how to fix this?
Here's a sample:
Code:
Sub VehInv() cntYear = (ThisWorkbook.Sheets(xPage11).Cells(Rows.Count - 1, PivTbl).End(xlUp).Row - 4)
Sheets(xPage01).Select
'Clear existing Table
ClearOldData
'The first TagType, alphabetically
TagTypeB
'Other Tag Types
TagTypeO
'Format Present
FormatChart
If Sheets(xPage01).UsedRange.SpecialCells(xlCellTypeLastCell).Offset(-1) = "" Then Sheets(xPage01).Range(Sheets(xPage01).UsedRange.SpecialCells(xlCellTypeLastCell).End(xlUp).Offset(1), Sheets(xPage01).UsedRange.SpecialCells(xlCellTypeLastCell)).EntireRow.Delete shift:=xlUp
End Sub
______________________________________________________________________________________________________
Sub ClearOldData()
rownum = Sheets(xPage01).Cells(fstRow, fstcol).End(xlDown).Row
Sheets(xPage01).Range(Sheets(xPage01).Cells(fstRow, fstcol).Address & ":" & Sheets(xPage01).Cells(rownum, lstcol).Address).EntireRow.Delete shift:=xlUp
End Sub
I've tried checking VBA's Options and Reference(Library's.) Can anyone tell me how to fix this?