![]() |
Automatically create comments based upon cell value and related datain database
Hi all,
I am creating a follow up system for car fleet management. Is it possible to create a comment in a cell based upon the content in that cell and a related database with the car details. For example : In a cell next to an employee name I fill in ABC123 (number plate) and in the comment box I would like to see the details (Toyota Avensis contract number 123456) This data exists in a database. Thanks in advance for your feedback Dirk |
Automatically create comments based upon cell value and related da
What kind of database is the information you want in? Access, another Excel
worksheet, a different Excel workbook? Regardless, this will no doubt be done with a Worksheet_Change() event handling VBA macro. " wrote: Hi all, I am creating a follow up system for car fleet management. Is it possible to create a comment in a cell based upon the content in that cell and a related database with the car details. For example : In a cell next to an employee name I fill in ABC123 (number plate) and in the comment box I would like to see the details (Toyota Avensis contract number 123456) This data exists in a database. Thanks in advance for your feedback Dirk |
Automatically create comments based upon cell value and related da
Try this Change event macro:
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 1 Then ' "if number plate" column is e.g. A Target.ClearComments commtext = retrievefromDB(Target.Value) 'create your retrieve function With Target.AddComment .Visible = False .Text commtext End With End If End Sub Regards, Stefi ezt *rta: Hi all, I am creating a follow up system for car fleet management. Is it possible to create a comment in a cell based upon the content in that cell and a related database with the car details. For example : In a cell next to an employee name I fill in ABC123 (number plate) and in the comment box I would like to see the details (Toyota Avensis contract number 123456) This data exists in a database. Thanks in advance for your feedback Dirk |
Automatically create comments based upon cell value and relatedda
JLatham removethis wrote: What kind of database is the information you want in? Access, another Excel worksheet, a different Excel workbook? Regardless, this will no doubt be done with a Worksheet_Change() event handling VBA macro. " wrote: Hi all, I am creating a follow up system for car fleet management. Is it possible to create a comment in a cell based upon the content in that cell and a related database with the car details. For example : In a cell next to an employee name I fill in ABC123 (number plate) and in the comment box I would like to see the details (Toyota Avensis contract number 123456) This data exists in a database. Thanks in advance for your feedback Dirk |
All times are GMT +1. The time now is 01:29 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com