http://tinypic.com/r/amdso7/9
My code is only working when it is unprotcted,i wanto work my code when it is protected
i have added my macro to 2 pictures
1 picture to add columns
2.Code not working properly
iam attaching here with image which is protected.
As well as i am looking for deleting the entire column which is added by above code by input box
My code is only working when it is unprotcted,i wanto work my code when it is protected
i have added my macro to 2 pictures
1 picture to add columns
2.Code not working properly
Code:
Sub addcolumns1()
Dim numcol As String
numcol = InputBox("Enter number of columns to insert:", _
"Number of Column?")
If numcol = "" Then
MsgBox ("No value entered")
Exit Sub
End If
Range("S1").Resize(, numcol).EntireColumn.Insert
Columns(18).EntireColumn.Copy Range("S1").Resize(, numcol)
End Sub
As well as i am looking for deleting the entire column which is added by above code by input box
Last edited: