+ Reply to Thread
Results 1 to 2 of 2

Macro that will hide/unhide rows based on message box answer

  1. #1
    Registered User
    Join Date
    04-28-2014
    Location
    Reno, Nevada
    MS-Off Ver
    Excel 2010
    Posts
    3

    Macro that will hide/unhide rows based on message box answer

    So I need some help.

    I have a VBA code that generates a message box when the value in D6 changes.

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Intersect(Target, Range("D6")) Is Nothing Or Target.Cells.Count > 1 Then Exit Sub
    If Target.Value = "Promotion" Then
    MsgBox ("REMINDER The majority of the time .....")
    ElseIf Target.Value = "Pay Adjustment" Then
    MsgBox ("REMINDER: In general....")
    ElseIf Target.Value = "Lateral Position Change" Then
    MsgBox ("REMINDER: ...")
    End If
    End Sub

    I would need to add the YES/NO commands to the message box and if Yes hide a range of rows and unhide a different range of rows.

    Any and all help would be greatly appreciated.

    Thank you,

  2. #2
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: Macro that will hide/unhide rows based on message box answer

    This should give you an idea to work with, but for further (detailed) help, we will need to know more about the structure of your data and what to hide or unhide.

    Please Login or Register  to view this content.
    Regards,
    Rudi

+ 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] Macro to unhide & hide rows based on column value
    By qvfr034 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-15-2020, 03:00 PM
  2. [SOLVED] Macro to automatically hide or unhide rows based on either a value or no value in a cell
    By WFP111 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-04-2013, 12:28 PM
  3. simple macro to hide or unhide rows based on a cell value
    By Russ Fuquay in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-19-2013, 06:32 PM
  4. Macro to Hide/Unhide Multiple Rows Based on Cell Value
    By mbp727 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-17-2013, 11:12 AM
  5. Macro - Hide/Unhide Rows based on conditional criteria
    By cklein in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-09-2012, 02:23 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