+ Reply to Thread
Results 1 to 4 of 4

BeforeSave on a Colomn

  1. #1
    Registered User
    Join Date
    08-31-2021
    Location
    France
    MS-Off Ver
    2008
    Posts
    2

    Unhappy BeforeSave on a Colomn

    Hi All,

    I am trying to setup a beforesave macro on a colomn value, but I can only management to make it work on a single cell.

    Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)

    If ThisWorkbook.Sheets("Template").Range("A9").Value = "Invalid" Then
    MsgBox "You need to fill up the invalid colomn"
    Cancel = True

    End If
    End Sub

    My aim here is that the range is not only A9, but all the colomn, but I cannot find my way.

    Hope you guys can help out

    All the best,
    T

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: BeforeSave on a Colomn

    Try:
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Registered User
    Join Date
    08-31-2021
    Location
    France
    MS-Off Ver
    2008
    Posts
    2

    Re: BeforeSave on a Colomn

    Awesome Mumps you rock - I spent hours trying to figure that out ...

    thanks again !

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: BeforeSave on a Colomn

    You are very welcome.

+ 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. [SOLVED] Help required with BeforeSave
    By jason1970 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-01-2016, 05:34 PM
  2. [SOLVED] Need Help with a BeforeSave Macro
    By mtwask01 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 01-04-2016, 04:48 PM
  3. Replies: 4
    Last Post: 10-29-2012, 10:26 AM
  4. how to apply Formula at all colomn without the first colomn
    By ramiyousef in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 10-19-2012, 03:31 AM
  5. [SOLVED] A BeforeSave that I can't do
    By jjislas in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-29-2012, 11:35 PM
  6. BeforeSave XL
    By royinfo in forum Excel General
    Replies: 2
    Last Post: 11-19-2009, 08:19 AM
  7. BeforeSave
    By Steven in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-21-2006, 01:40 PM

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