This is what I would like to do if possible:
If E9 on Sheet1 is 1, then hide columns F-L on Sheet2.
Thanks for helping me.
Excel 2000
This is what I would like to do if possible:
If E9 on Sheet1 is 1, then hide columns F-L on Sheet2.
Thanks for helping me.
Excel 2000
Last edited by proepert; 01-25-2010 at 06:40 AM. Reason: SOLVED
Hi proepert
In the worksheet1 module
Private Sub Worksheet_Deactivate() If Range("E9") = 1 Then Sheets("sheet2").Columns("F:L").EntireColumn.Hidden = True Else Sheets("sheet2").Columns("F:L").EntireColumn.Hidden = False End If End Sub
try this code
Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("E9")) Is Nothing Then If Range("E9") = 1 Then Sheets(2).Range("F:L").EntireColumn.Hidden = True Else Sheets(2).Range("F:L").EntireColumn.Hidden = False End If End If End Sub
Люди, питающие благие намерения, как раз и становятся чудовищами.
Regards, ?Born in USSR?
Vusal M Dadashev
Baku, Azerbaijan
One line
Option Explicit Private Sub Worksheet_Deactivate() Sheets("sheet2").Columns("F:L").EntireColumn.Hidden = Range("E9").Value End Sub
Hope that helps.
RoyUK
--------
For Excel Tips & Solutions, free examples and tutorials why not check out my web site
Free DataBaseForm example
proepert
Thanks for the rep.
If you are satisfied with the solution(s) provided, please mark your thread as Solved.
How to mark a thread Solved
Go to the first post
Click edit
Click Go Advanced
Just below the word Title you will see a dropdown with the word No prefix.
Change to Solved
Click Save
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks