Worksheet_Change issue

daveymossman

New Member
Joined
Jul 12, 2013
Messages
2
I'm a bit of a novice. I have a drop down cell which I have named "Deal Status". Whenever that cell is changed, I want a macro to run to potentially hide/unhide sheets depending on the selection. When "Executed LOI Received" is selected, the sheets are remaining hidden (I want them unhidden for that value). Currently I have written:

Private Sub Worksheet_Change(ByVal Target As Range)


If Target.Address = Range("DealStatus").Address Then
If Range("DealStatus").Value = "Executed LOI Received" Then
Sheets("Loan Writeup").Visible = True
Sheets("CMHC Checklist").Visible = True
Sheets("Funder Checklist").Visible = True
Sheets("CMHC Form 530B").Visible = True

Else
Sheets("Loan Writeup").Visible = False
Sheets("CMHC Checklist").Visible = False
Sheets("Funder Checklist").Visible = False
Sheets("CMHC Form 530B").Visible = False
End If

End If


End Sub



Any ideas on what I'm doing incorrectly?
 
Last edited:

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Welcome to the Board!

I'd probably just remove the first If statement and use:

If Target.Value = "Executed LOI Received" Then

HTH,
 
Upvote 0

Forum statistics

Threads
1,215,050
Messages
6,122,868
Members
449,097
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top