How to Track Column Insert/Delete Event in Excel

  • Thread starter Thread starter mac_excel
  • Start date Start date
M

mac_excel

Hi,

I want display message box when the user inserts or deletes a column in
excel worksheet.

Actually, the worksheet format is fixed and I want to prohibit the user
from changing the fixed format. Hence, if the user deletes or inserts a
new column in worksheet, i want to prompt the user.

As far as i know, there is only Sheet_Change Event available for a
sheet.

Appreciate your help,

regards,

mac
 
It sounds like Protect Sheet (in the Tools menu) might give you what you
want.
It may depend upon which version of XL that you're using, but mine can
prevent users from inserting or deleting rows or columns.

Rgds,
ScottO

in message |
| Hi,
|
| I want display message box when the user inserts or deletes a column in
| excel worksheet.
|
| Actually, the worksheet format is fixed and I want to prohibit the user
| from changing the fixed format. Hence, if the user deletes or inserts a
| new column in worksheet, i want to prompt the user.
|
| As far as i know, there is only Sheet_Change Event available for a
| sheet.
|
| Appreciate your help,
|
| regards,
|
| mac
|
|
| --
| mac_excel
| ------------------------------------------------------------------------
| mac_excel's Profile:
http://www.excelforum.com/member.php?action=getinfo&userid=24983
| View this thread: http://www.excelforum.com/showthread.php?threadid=385154
|
 
Hi ScottO,

Thanks for the immediate reply!
Sorry, I could not convey it properly.

Here i go....

I have defined two columns, (B and C) in an excel sheet.
I want user to enter values only in these two columns.
I dont want the user to insert a new column in between B and C using
the menu Insert->Row (or right clicking on the column C)
(Thats what ment by saying the format is fixed.)

In "Sheet_Change" event, I can write a message (msbbox "change event is
called") which will appear when any cell value is changed in the sheet.
That is how the change event of a cell can be trapped.

Similarly, i want to show a message box when the user inserts/deletes a
row or a column in a sheet. Where should I write code? Which event
should I use? (IN EXCEL VBA CODE)

Regards,

Mac
 
Sorry, I'm no good at macros (or much else :).
Can someone else help please ...
ScottO


in message |
| Hi ScottO,
|
| Thanks for the immediate reply!
| Sorry, I could not convey it properly.
|
| Here i go....
|
| I have defined two columns, (B and C) in an excel sheet.
| I want user to enter values only in these two columns.
| I dont want the user to insert a new column in between B and C using
| the menu Insert->Row (or right clicking on the column C)
| (Thats what ment by saying the format is fixed.)
|
| In "Sheet_Change" event, I can write a message (msbbox "change event is
| called") which will appear when any cell value is changed in the sheet.
| That is how the change event of a cell can be trapped.
|
| Similarly, i want to show a message box when the user inserts/deletes a
| row or a column in a sheet. Where should I write code? Which event
| should I use? (IN EXCEL VBA CODE)
|
| Regards,
|
| Mac
|
|
| --
| mac_excel
| ------------------------------------------------------------------------
| mac_excel's Profile:
http://www.excelforum.com/member.php?action=getinfo&userid=24983
| View this thread: http://www.excelforum.com/showthread.php?threadid=385154
|
 
Back
Top