MarkReddell
Board Regular
- Joined
- Sep 1, 2011
- Messages
- 210
- Office Version
- 365
- Platform
- Windows
- Mobile
I'm needing to call a macro based on hidden or visible column C ???
Private Sub Worksheet_Activate()
If Me.Columns("C").Hidden = False Then
Call mySub1
Else
Call mySub2
End If
End Sub
Sub mySub1()
'put your sub for col C not hidden here and remove the message box below
MsgBox "Hello - col C is not hidden"
End Sub
Sub mySub2()
'put your sub for col C hidden here and remove the message box below
MsgBox "Hello - col C is hidden"
End Sub
I'm needing to call a macro based on hidden or visible column C ???
You are toggling the hidden property of the column. Which status (hidden or nonhidden) should result in a call to AdjustRetail?I'm using this macro currently.
Sub HdeDiscounts()
Columns("C:C").Hidden = Not Columns("C:C").Hidden
End Sub
I need to be able to call AdjustRetail, or, ReadjustRetail. Is this possible???
You are toggling the hidden property of the column. Which status (hidden or nonhidden) should result in a call to AdjustRetail?
You haven't provided much info on what you want to accomplish so you may want to remove the col C hidden/unhidden toggle line from this.Thanx for your help!!! Yes, when Col. C is hidden, Call Readjustretail, When Col. C is displayed, Call Adjustretail.
Sub HdeDiscounts()
Columns("C:C").Hidden = Not Columns("C:C").Hidden
If Columns("C:C").Hidden Then
Call Readjustretail
Else
Call Adjustretail
End If
End Sub
You haven't provided much info on what you want to accomplish so you may want to remove the col C hidden/unhidden toggle line from this.
Code:Sub HdeDiscounts() Columns("C:C").Hidden = Not Columns("C:C").Hidden If Columns("C:C").Hidden Then Call Readjustretail Else Call Adjustretail End If End Sub
You are welcome - thanks for the reply.Thank you very much! This Worx!!! Have a very blessed day!!!