+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    10-23-2008
    Location
    Nigeria
    Posts
    17

    using vba to reference column headers

    Hello Friends!

    To illustrate my problem, i have created and attached 2 files.

    These 2 files are linked and any change in one file (marital_status.xlsm) should cause the pivot tables in the other file (marital_status_report.xlsm) to refresh. This works fine. No issues here.

    My problems started when i tried to create a notification message box, which tells the user about the change being made. The message box displays, but I am having trouble referencing the column headers.

    Kindly open the two files, and make any change in the "marital_status.xlsm". When you read the message box, you will see the issue i am having.

    Eagerly expecting your replies.
    Attached Files Attached Files
    Last edited by byronova; 03-08-2010 at 08:03 AM.

  2. #2
    Forum Guru
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2003
    Posts
    2,286

    Re: using vba to reference column headers

    Cells() takes arguments (row, column) - not (column, row).
    try:
    Code:
    MsgBox "You Have Just Changed The " & Cells(1, Target.Column) & " Of " & Cells(Target.Row, 1)
    (middle line)

    hth

  3. #3
    Registered User
    Join Date
    10-23-2008
    Location
    Nigeria
    Posts
    17

    Re: using vba to reference column headers

    Dear Cheeky Charlie,

    Thank you for your reply! works like a charm!

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.2.0