+ Reply to Thread
Results 1 to 7 of 7

How to make a warning message box "Don't insert line!" ?

  1. #1
    Forum Contributor
    Join Date
    09-18-2011
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    375

    How to make a warning message box "Don't insert line!" ?

    As I don't want the users of my excel insert line,
    if they insert line, I want a warning message box "Don't insert line!" appeared.
    (The actual wording and type of message box will be confirmed myself afterwards)

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: How to make a warning message box "Don't insert line!" ?

    Define a name
    Name: Row_1000
    RefersTo: Sheet1!$1000:1000

    Then put the formula =ROW(Row_1000) in a discreete cell.

    Then put this in Sheet1's code module

    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Forum Contributor
    Join Date
    09-18-2011
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    375

    Re: How to make a warning message box "Don't insert line!" ?

    Thanks mikerickson.

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: How to make a warning message box "Don't insert line!" ?

    Actually, that should be in the Calculate event, not the Change event You can use similar code if you want to prevent row deletion.


    If you want the user to be able to delete rows, but not insert any, you have to modify that routine a bit.

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    09-18-2011
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    375

    Re: How to make a warning message box "Don't insert line!" ?

    Thanks mikerickson.

    Please advise how to "put this(VBA) in Sheet1's code module"?

  6. #6
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: How to make a warning message box "Don't insert line!" ?


  7. #7
    Forum Contributor
    Join Date
    09-18-2011
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    375

    Re: How to make a warning message box "Don't insert line!" ?

    Thanks again mikerickson. I see.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Receiving "enable content" warning after executing "save as" code
    By phbryan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-11-2014, 12:02 PM
  2. Replies: 0
    Last Post: 04-08-2013, 08:02 AM
  3. MSoffice Outlook 2003 message to be saved in C dir with the file name "From" "Sent" "Sub"
    By shailendra0509 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-09-2012, 01:32 AM
  4. insert a line in excelsheet before a row where cell value in Column A is "XYZ11"
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-10-2011, 04:16 AM
  5. [SOLVED] How to stop warning message in Excel "initialize ActiveX controls"
    By Sya in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-27-2006, 05:20 AM
  6. value-driven message in excel e.g., "warning!"
    By Mr. Walker in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-09-2006, 03:40 PM
  7. [SOLVED] If changed array formula reduce ""\""\""\ - signs to #Missing, will it make ...
    By Maria J-son in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-05-2006, 08:25 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1