you dont need a macro for this, after you hide a column, and after you lock or unlock the cells you want your users to be able to modify, under the review tab, protect worksheet, check the options that enables your user to do (or not) an action on that worksheet. The password is optional, but if you dont use a password, your users can unprotect the worksheet and delete columns by simply clicking the unprotect worksheet under review-tab
you have here details about using this feature
http://office.microsoft.com/en-us/he...010078580.aspx