Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Popup or comment on the column feilds using VBA
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Nov 2009
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Popup or comment on the column feilds using VBA

    We are looking for VBA to show a pop-up or comment when a person clicks on the feild colum in the excel sheet3 tab that summarizes information about that feild from which ever tab the feild is on( Sheet1 tab or sheet2 tab) or shows "not defined" if the feild doesn't appear on either tab.

    ****** http-equiv="Content-Type" content="text/html; charset=utf-8">****** name="ProgId" content="Word.Document">****** name="Generator" content="Microsoft Word 12">****** name="Originator" content="Microsoft Word 12">
    Any help will be appreciated.

  2. #2
    Legend lenze's Avatar
    Join Date
    Feb 2002
    Location
    Helena, MT
    Posts
    13,690
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Default Re: Popup or comment on the column feilds using VBA

    Hi and welcome to the board!!
    Need a little more information!! What to you want the pop-up/comment to say??
    Every cell in the column, or just the header cell?

    lenze
    If you have to tell your boss you're good with Excel, you're NOT!!
    All I know about Excel I owe to my ignorance!
    Scotch: Because you don't solve great Excel problems over white wine

  3. #3
    New Member
    Join Date
    Nov 2009
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Popup or comment on the column feilds using VBA

    Hi,

    In the work sheet when the user clicks on any cell of a particular column we need to display a pop-up or comment message. The content of the popup/comment message will be based up on some validation, by referencing other work sheets(sheet1, sheet2).

  4. #4
    Legend lenze's Avatar
    Join Date
    Feb 2002
    Location
    Helena, MT
    Posts
    13,690
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Default Re: Popup or comment on the column feilds using VBA

    So!!!
    What Column?
    What Validation?
    What Sheet?
    You may need nothing more than Data Validation Info. You may need a comment. You may need a Message Box. You may need a userform. But, you have to give specifics if you want an answer.

    lenze
    If you have to tell your boss you're good with Excel, you're NOT!!
    All I know about Excel I owe to my ignorance!
    Scotch: Because you don't solve great Excel problems over white wine

  5. #5
    New Member
    Join Date
    Nov 2009
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Popup or comment on the column feilds using VBA

    Thanks for the fast reply.

    In the excel work sheet when the user clicks on any cell of a particular column
    (for example : when a user points to a particular cell (A2) in column A of sheet3. we need to display a pop-up or comment message. The content of the popup/comment message will be based up on some data validation, by referencing other work sheets(sheet1, sheet2).

  6. #6
    Legend lenze's Avatar
    Join Date
    Feb 2002
    Location
    Helena, MT
    Posts
    13,690
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Default Re: Popup or comment on the column feilds using VBA

    Let's try again!
    Getting a popup or comment is easy, but no one on this board can read your mind. So, unless you tell us what determines the message and where it comes from, we can't help you. The sentence "The content of the popup/comment message will be based up on some data validation, by referencing other work sheets(sheet1, sheet2)." means nothing to us.

    lenze
    If you have to tell your boss you're good with Excel, you're NOT!!
    All I know about Excel I owe to my ignorance!
    Scotch: Because you don't solve great Excel problems over white wine

  7. #7
    New Member
    Join Date
    Nov 2009
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Popup or comment on the column feilds using VBA

    Hi,

    I will give you a example.

    Right now we have excel template which contain three tabs(sheet1, sheet2, sheet3). We have some text data in the cells (c2,c3,c4.....) of column C of sheet3. This same text is divided in the two different sheets (column D of cells (D2,D3,...)) of Sheet1 and column D of cells (D2,D3,D4...) of Sheet2).

    our task is Now when we point to a particular cell(c2,c3..) in column c of sheet3, A pop-up or comment must be displayed showing the current text data in cell (c1,c2...) is in Sheet1, sheet2 or Not specified.

  8. #8
    Legend lenze's Avatar
    Join Date
    Feb 2002
    Location
    Helena, MT
    Posts
    13,690
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Default Re: Popup or comment on the column feilds using VBA

    So, you want to know if the data you select in sheet3 is on Sheet1,Sheet 2 or neither. Will the data be in the same Row in column "D" or could it be anywhere in column "D" on sheet1 or Sheet2? Could you also give some sample data?

    lenze
    If you have to tell your boss you're good with Excel, you're NOT!!
    All I know about Excel I owe to my ignorance!
    Scotch: Because you don't solve great Excel problems over white wine

  9. #9
    New Member
    Join Date
    Nov 2009
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Popup or comment on the column feilds using VBA

    The data can be any where in column D on sheet1 or sheet2.


    The sample data is Project name, current stage, project description, Innovate director etc....

  10. #10
    Legend lenze's Avatar
    Join Date
    Feb 2002
    Location
    Helena, MT
    Posts
    13,690
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Default Re: Popup or comment on the column feilds using VBA

    I'm still not clear what you want, but maybe this will get you started!!
    Code:
    Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
    Cancel = True
    If Target.Column <> 3 Then Exit Sub
    Dim C As Range
    Set C = Sheet1.Range("D2:D" & Sheet1.Cells(Rows.Count, "D").End(xlUp).Row).Find(Target, LookIn:=xlValues)
    If Not C Is Nothing Then
        MsgBox "Found on sheet1 in " & C.Address
    Else:
    Set C = Sheet2.Range("D2:D" & Sheet2.Cells(Rows.Count, "D").End(xlUp).Row).Find(Target, LookIn:=xlValues)
        If Not C Is Nothing Then
        MsgBox "Found on Sheet2 in " & C.Address
        Else: MsgBox "Not Found"
        End If
    End If
    End Sub
    I used a BeforeDoubleClick event instead of Selection_Change. It's much easier to work with and less annoying.
    lenze
    If you have to tell your boss you're good with Excel, you're NOT!!
    All I know about Excel I owe to my ignorance!
    Scotch: Because you don't solve great Excel problems over white wine

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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