Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,069
Default Suppresing Insert Row functionality

Hi,

Using the Change Event, how can i stop users inserting columns when the
Cellpointer is in column C please?

Thanks

John

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Suppresing Insert Row functionality

John,

I'm not sure about the worksheet_change event but it can be done with the
selection_change event by disbaling the insert rows option every time column
3 is the active column:-

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range)
If ActiveCell.Column = 3 Then
With Application.CommandBars("Worksheet Menu Bar").Controls("&Insert")
.Controls("&Rows").Enabled = False
End With
Else
With Application.CommandBars("Worksheet Menu Bar").Controls("&Insert")
.Controls("&Rows").Enabled = True
End With
End If
End Sub

Mike

"John" wrote:

Hi,

Using the Change Event, how can i stop users inserting columns when the
Cellpointer is in column C please?

Thanks

John

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Suppresing Insert Row functionality

John,

Forgot the righ-click method of insert so add this:-

Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, ByVal Target
As Range, Cancel As Boolean)
If ActiveCell.Column = 3 Then Cancel = True
End Sub

Mike

"John" wrote:

Hi,

Using the Change Event, how can i stop users inserting columns when the
Cellpointer is in column C please?

Thanks

John

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Go to functionality [email protected] Excel Worksheet Functions 0 November 7th 06 10:08 PM
DES Encryption functionality Michael P Excel Worksheet Functions 4 November 2nd 06 08:14 AM
Checkbox functionality Basia Excel Discussion (Misc queries) 2 June 19th 06 04:42 PM
Help with Countrows functionality within a Macro Pank New Users to Excel 5 July 11th 05 07:05 PM
Losing Add-Inn Functionality Ben Excel Discussion (Misc queries) 0 April 20th 05 06:06 AM


All times are GMT +1. The time now is 02:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"