Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi There,
Is the following possible? I would like to show in my cell: <Double Click Me when the cell is empty. Like you could do with conditional formatting, Color the cell condition the cell is empty. Looking forward to your solutions, Sige |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How about this for a bit of nonsense?
For all cells that you want this to apply to, create a complementary cell referencing (such as =A1) Then in the complementary cells, add a custom format of General;-General;"<Double click me" Using the camera tool, copy images of the complementary cells over to the actual cells. -- HTH Bob Phillips "Sige" wrote in message ups.com... Hi There, Is the following possible? I would like to show in my cell: <Double Click Me when the cell is empty. Like you could do with conditional formatting, Color the cell condition the cell is empty. Looking forward to your solutions, Sige |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Bob, Norman,
Thanks for your solutions ... Bob: It works perfectly fine but -for once- I do not want to have a formula in my cell to invoke it it ... Norman: How can I invoke it? ... How does it get triggered? Sige |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Sige,
Norman: How can I invoke it? ... How does it get triggered? If the code is pasted into the worksheet's code module, then the code should respond automatically to changes in the sheet's A1 cell. --- Regards, Norman "Sige" wrote in message oups.com... Hi Bob, Norman, Thanks for your solutions ... Bob: It works perfectly fine but -for once- I do not want to have a formula in my cell to invoke it it ... Norman: How can I invoke it? ... How does it get triggered? Sige |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Norman,
Thanks! Thats what I thought and nothing happened ... my workbook got on Manual Calc, maybe thats why. Is it possible to set the range.... on the cell in last row in column D? Something like: Dim intColumn As Integer, lngLastRow As Long intColumn = 4 lngLastRow = .Cells(.Rows.Count, intColumn).End(xlUp).Row But this obviously does not set the last cell... Cheers Sige |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This does not set the range neither...
Set rng = Range("d65536").End(xlUp).Address |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Sige,
Thats what I thought and nothing happened ... my workbook got on Manual Calc, maybe thats why. The calculation setting should have no bearing. Are you sure that the code has been pasted into the code module behind the active worksheet? If so, perhaps you have inadvertently disabled events. To eliminate this possibility, paste the following code into a standard module: Sub AAA Application.EnableEvents = True End Sub After running this sub, try deleting the contents of cell A1, which should produce the required message text in A1. Is it possible to set the range.... on the cell in last row in column D? If your intention is that the cell after the last populated cell in column D should display the message text, then try instead: '===================== Private Sub Worksheet_Calculate() Dim rng As Range Dim LastCell As Range Dim rcell As Range Dim sStr As String Const IntCol As Long = 4 sStr = "Double Click Me" Set LastCell = Cells(Me.Rows.Count, IntCol).End(xlUp)(2) Set rng = Range(Cells(1, IntCol), LastCell) On Error GoTo XIT Application.EnableEvents = False For Each rcell In rng.Cells If rcell.Value = sStr Then rcell.ClearContents Next rcell Set LastCell = Cells(Me.Rows.Count, IntCol).End(xlUp)(2) LastCell.Value = sStr XIT: Application.EnableEvents = True End Sub ''<<===================== Unlike the previous procedure, this code responds to the worksheet's calculate event and, therefore, requires that calculation should not be set to manual. In order to coerce the calculation event, you might consider including a volatile worksheet function (such as Now(), Indirect(), Offset)) somewhere in the sheet. --- Regards, Norman "Sige" wrote in message ups.com... Hi Norman, Thanks! Thats what I thought and nothing happened ... my workbook got on Manual Calc, maybe thats why. Is it possible to set the range.... on the cell in last row in column D? Something like: Dim intColumn As Integer, lngLastRow As Long intColumn = 4 lngLastRow = .Cells(.Rows.Count, intColumn).End(xlUp).Row But this obviously does not set the last cell... Cheers Sige |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
using a conditional suffix in text function format syntax=text(value,format_text) | Excel Worksheet Functions | |||
conditional formatting in text box | Excel Discussion (Misc queries) | |||
Conditional Formatting based on text within a cell w/ text AND num | Excel Worksheet Functions | |||
conditional text | Excel Worksheet Functions | |||
Conditional Formatting based on Text within Text | Excel Discussion (Misc queries) |