Hi,
i want to hide specified columns in a WB.
The macro should ask which columns i want to hide.
These columns could be A,C,H or D, AA, AH.
So i need a request from the macro with column i want to hide.
This request should ask me as long i enter a name for a column.
If i do not enter any more, the macro should hide the selected columns.
Normaly the number of columns i have to hide is between 1 and 16.
' Select Row(s) for hide
Private Sub InputTest()
Dim InputDummy As String, Cancel As Boolean, strPrompt As String
strPrompt = "Please declare column to hide"
Do
InputDummy = InputBox(strPrompt, "No column selected")
Cancel = StrPtr(InputDummy) = 0
strPrompt = "Please choose a column to hide an press OK"
Loop Until InputDummy <> "" Or Cancel
If Not Cancel Then
Columns(InputDummy).Select
Selection.EntireColumn.Hidden = True
Else
MsgBox "You press 'Cancel'"
End If
End Sub
but how is it possible to choose more than 1 column?
Thank you
kind regards
Bookmarks