ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   How to Track Column Insert/Delete Event in Excel (https://www.excelbanter.com/new-users-excel/34178-how-track-column-insert-delete-event-excel.html)

mac_excel

How to Track Column Insert/Delete Event in 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


--
mac_excel
------------------------------------------------------------------------
mac_excel's Profile: http://www.excelforum.com/member.php...o&userid=24983
View this thread: http://www.excelforum.com/showthread...hreadid=385154


ScottO

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

"mac_excel" wrote
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...o&userid=24983
| View this thread: http://www.excelforum.com/showthread...hreadid=385154
|



mac_excel


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...o&userid=24983
View this thread: http://www.excelforum.com/showthread...hreadid=385154


ScottO

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


"mac_excel" wrote
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...o&userid=24983
| View this thread: http://www.excelforum.com/showthread...hreadid=385154
|




All times are GMT +1. The time now is 10:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com