Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi there,
I get a type mismatch error on the following line of code : "Set objCell = Application.Selection" (see below) Any idea why and how to fix ... (I swear it used to work!!!) Thanks!!!! D Sub Reporting_Choice() Dim objWS As Excel.Worksheet Dim objCell As Excel.Range, objR As Excel.Range Dim i As Byte Dim J As Long Set objWS = Sheets("Master") Set objCell = Application.Selection Select Case objCell Case 1 Call Reporting_1 Case 2 Call Reporting_2 End Select J = objCell.Interior.ColorIndex ' Hide columns For i = 6 To 200 Set objR = objWS.Cells(2, i) If objR.Interior.ColorIndex < J Then objWS.Columns(i).Hidden = True End If Next Set objR = Nothing Set objCell = Nothing Set objWS = Nothing Sheets("results").Select End Sub *** Sent via Developersdex http://www.developersdex.com *** |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Type Mismatch: array or user defined type expected | Excel Programming | |||
Type mismatch using rnge as Range with Type 8 Input Box | Excel Programming | |||
Help: Compile error: type mismatch: array or user defined type expected | Excel Programming | |||
type mismatch here! | Excel Programming | |||
Type mismatch | Excel Programming |