lior03
01-14-2006, 05:02 AM
hello
i am trying to built a macro to enable the user choose between hide or unhide a column.
using select case the user can "toggle" between both
possibilities.whats wrong?
Sub hider()
Dim hide As Integer
MsgBox "to hide a column press 1" & vbLf & _
"to unhide column press 2"
InputBox ("select hide/unhide")
Select Case hide
Case 1
Selection.EntireColumn.Hidden = True
Case 2
Selection.EntireColumn.Hidden = False
End Select
End Sub
thanks
i am trying to built a macro to enable the user choose between hide or unhide a column.
using select case the user can "toggle" between both
possibilities.whats wrong?
Sub hider()
Dim hide As Integer
MsgBox "to hide a column press 1" & vbLf & _
"to unhide column press 2"
InputBox ("select hide/unhide")
Select Case hide
Case 1
Selection.EntireColumn.Hidden = True
Case 2
Selection.EntireColumn.Hidden = False
End Select
End Sub
thanks