Saturday, 11 July 2015

Alt + I + R (Or) Alt + I + C insert function not working

You can apply the following macro to activate the nativity function of insert rows columns

 

Sub activateInsertfunctions()

Call Allow_InsertColumn(True)

Call Allow_InsertRow(True)

End Sub

 

Function Allow_InsertRow(Allow As Boolean)

Dim ctl As CommandBarControl

For Each ctl In Application.CommandBars.FindControls(ID:=296)

ctl.Enabled = Allow

Next ctl

End Function

 

Function Allow_InsertColumn(Allow As Boolean) 'Allow user to or prevent user from inserting columns

Dim ctl As CommandBarControl

For Each ctl In Application.CommandBars.FindControls(ID:=297)

ctl.Enabled = Allow

Next ctl

End Function

 

Credit: Jos Dijkstra

 

No comments:

Post a Comment