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: 42
Default Code correction pls help

Hi,

I have a cell (D4) in Sheet 2, which is referenced to cell (D87) in
Sheet1.

Cell D4 has a dropdown (thru Data - Validation - list) Values are :-
Select one, 1, 2, 3, 4, 5

Now i have a code in Sheet2 (for cell D4), which will unhide cells
based on values given in D87. The code is working fine.

My problem is the rows dont hide/unhide, till click on some other cell
and click back on D4 in Sheet2. Can this be fixed ?? My code is below

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

With Range("Offering_Info")
If Not Intersect(.Cells, Target) Is Nothing Then
Application.ScreenUpdating = False
Rows("5:14").Hidden = True
If IsNumeric(.Value) Then
Rows("5:5"). _
Resize(1 + CLng(.Value) * 2).Hidden = False
End If
Application.ScreenUpdating = True
End If
End With
End Sub

 
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
Value correction P. Zicari Excel Discussion (Misc queries) 2 April 15th 08 07:28 PM
VBA Code Correction RichIT Excel Programming 3 August 10th 06 05:02 PM
VBA Code Correction RichIT Excel Programming 2 August 10th 06 04:30 PM
Code Correction Need Safi Excel Programming 0 July 30th 06 06:05 PM
correction nowfal Excel Discussion (Misc queries) 4 March 24th 06 06:40 PM


All times are GMT +1. The time now is 03:40 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"