+ Reply to Thread
Results 1 to 4 of 4

Excel warning when save worksheet.

Hybrid View

  1. #1
    Registered User
    Join Date
    07-19-2012
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    67

    Excel warning when save worksheet.

    Hi all,


    i have a excel template for accounting function. i have to tally the some of cells.

    can we set, if Cell A1 = change as "false", then a warning option have to display whenever we give save that workbook?

    Regards

    Jack

  2. #2
    Forum Contributor bonny24tycoon's Avatar
    Join Date
    04-02-2012
    Location
    Hell
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    405

    Re: Excel warning when save worksheet.

    Hi Mate,

    Welcome to the forum..

    Here you go.. Add the below code as a private sub on your workbook sheet like below - ( To add a private sub - ALT+F11 ---->> Click on sheet names on left hand side of the window i.e. Sheet1 or Sheet2 and paste below code on right hand window)

    Private Sub Worksheet_Change(ByVal Target As Range)
        Dim KeyCells As Range
    
        ' The variable KeyCells contains the cells that will
        ' cause an alert when they are changed.
        Set KeyCells = Range("A1")
        
        If KeyCells = "False" Then
          
            MsgBox "Cell " & Target.Address & " has changed to FALSE."
           
        End If
    End Sub
    You would then need to enable macros.. And You should be fine
    Last edited by bonny24tycoon; 08-02-2012 at 06:50 AM. Reason: Updated codes
    Thanks,

    Bonny Tycoon


  3. #3
    Registered User
    Join Date
    07-19-2012
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    67

    Re: Excel warning when save worksheet.

    Hi Boony,


    It working find thanks for your help... ( Am little scared, when i saw you location )

    Regards

    Jack

  4. #4
    Forum Contributor bonny24tycoon's Avatar
    Join Date
    04-02-2012
    Location
    Hell
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    405

    Re: Excel warning when save worksheet.

    Thats great I have you query resolved..

    Haha.. No worries mate.. I'm from India too..

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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