Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This code is to hide the entire row if the cell in column D is empty.
This code returns the Type MisMatch error: Sub hideme() Application.ScreenUpdating = False Dim myrange As Range, myrange1 As Range lastrow = Cells(Rows.Count, "D").End(xlUp).Row Set myrange = Range("D4:D" & lastrow) For Each c In myrange If c.Value = "" Then If myrange1 Is Nothing Then Set myrange1 = c.EntireRow Else Set myrange1 = Union(myrange1, c.EntireRow) End If End If Next myrange1.EntireRow.Hidden = True End Sub It also does work in my 2003 version but doesn't in the 2007... anyone know why this is? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Visual Basic Error Run Time Error, Type Mismatch | Excel Discussion (Misc queries) | |||
runtime error 13 - type mismatch error in Excel 97 on Citrix | Excel Programming | |||
Conditional Formatting - Run Time Error '13' Type Mismatch Error | Excel Programming | |||
Help: Compile error: type mismatch: array or user defined type expected | Excel Programming | |||
Befuddled with For Next Loop ------ Run - Time Error '13' Type Mismatch Error | Excel Programming |