Hey,
I am a novice when it comes to using ActiveX Control and VBA to build macros but I am having incredible difficulty getting something simple to work. I want to build a macro which hides and unhides 3 columns in my excel sheet however when I run the macro it unhides unwanted columns and then hides the majority of the sheet..
I am at a bit of a loss as to why this is happening, could someone please enlighten me?
This is the VBA code which i'm running, i just used the record Macro feature and copied and pasted it into the "view code" option when you right click the activex control in design mode.
These Macros did work perfectly earlier on. i did add one massive merged row along the top of row one though.. is this the cause of the issue? if it is can i get around it without un merging that top row?
Sub showF()
'
' showF Macro
'
'
Columns("K:O").Select
Range("K2").Activate
Selection.EntireColumn.Hidden = False
Range("K2").Select
End Sub
Sub HideF()
'
' HideF Macro
'
'
Columns("L:N").Select
Range("L2").Activate
Selection.EntireColumn.Hidden = True
Range("K2").Select
End Sub
I am a novice when it comes to using ActiveX Control and VBA to build macros but I am having incredible difficulty getting something simple to work. I want to build a macro which hides and unhides 3 columns in my excel sheet however when I run the macro it unhides unwanted columns and then hides the majority of the sheet..
I am at a bit of a loss as to why this is happening, could someone please enlighten me?
This is the VBA code which i'm running, i just used the record Macro feature and copied and pasted it into the "view code" option when you right click the activex control in design mode.
These Macros did work perfectly earlier on. i did add one massive merged row along the top of row one though.. is this the cause of the issue? if it is can i get around it without un merging that top row?
Sub showF()
'
' showF Macro
'
'
Columns("K:O").Select
Range("K2").Activate
Selection.EntireColumn.Hidden = False
Range("K2").Select
End Sub
Sub HideF()
'
' HideF Macro
'
'
Columns("L:N").Select
Range("L2").Activate
Selection.EntireColumn.Hidden = True
Range("K2").Select
End Sub