Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have some code running in a worksheet (sheet 1) to hide two worksheets
unless the value (text) in a cell (D4:E4 merged) of 'sheet 1' is a certain value. The value in 'D4:E4' is chosen from a list of 4 options (set up using a data validationlist). I am getting a type mismatch error if the value in 'd4' is deleted/cleared (not much of an issue as should only select form the list). More of an issue is I get the same error when any other merged cells (i.e. "C2:I2", "B18:J20") are cleared (i.e select cell and hit 'Delete'). Any ideas on why the error occurs or how to avoid it? The code: Private Sub Worksheet_Change(ByVal Target As Range) If Target = Range("D4") Then If Target.Value = "SMART Cable" Then Sheets("Load v Distance").Visible = True Sheets("Load v Time").Visible = True Else Sheets("Load v Distance").Visible = False Sheets("Load v Time").Visible = False End If End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Run-time error '13': Type mismatch | Excel Programming | |||
Visual Basic Error Run Time Error, Type Mismatch | Excel Discussion (Misc queries) | |||
Run-time error 13, Type Mismatch | Excel Programming | |||
Conditional Formatting - Run Time Error '13' Type Mismatch Error | Excel Programming | |||
Befuddled with For Next Loop ------ Run - Time Error '13' Type Mismatch Error | Excel Programming |