LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Hiding named ranges depending on a cell value


Hi I ahve a combo box, which changes the value in cell depending on the
choice u pick. the bumber in the cell is either the letter A, or the
letter B

My problem is that the macro doesn't hide or unhides... and I can' seem
to understand what the problem is...

Can anyone see the error in the macro below?


Macro:


Sub Hide_unhide_date_period()

' This procedure hides and displays the dates / period input cells
depending on the CC selection on the front sheet.
' Written by Christian Simonsen 17/03/06

Dim myCell As Range

With Application
ScreenUpdating = False
DisplayAlerts = False
End With

Set myCell = ActiveCell


If Worksheets("TM1").Range("G15") = "A" Then
Range("Project_Periods").Select
Selection.EntireRow.Hidden = False

Range("Project_dates").Select
Selection.EntireRow.Hidden = True

ElseIf Worksheets("TM1").Range("G15") = "B" Then

Range("Project_Periods").Select
Selection.EntireRow.Hidden = True

Range("Project_dates").Select
Selection.EntireRow.Hidden = False

End If


myCell.Select

With Application
ScreenUpdating = True
DisplayAlerts = True
End With

End Sub


--
Ctech


------------------------------------------------------------------------
Ctech's Profile: http://www.excelforum.com/member.php...o&userid=27745
View this thread: http://www.excelforum.com/showthread...hreadid=524273

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparing two ranges and get true or false in one cell depending onresult Leon[_2_] Excel Worksheet Functions 3 June 25th 09 11:15 PM
Named Ranges - accessing a cell mojoweiss Excel Discussion (Misc queries) 1 September 1st 05 04:20 PM
Named Cell Ranges Blackcat Excel Discussion (Misc queries) 7 December 9th 04 01:59 PM
Named Cell Ranges Blackcat Excel Discussion (Misc queries) 1 December 9th 04 09:57 AM
Hiding Named Ranges Matt Connor Excel Programming 12 February 17th 04 09:00 AM


All times are GMT +1. The time now is 02:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"