Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have some code on the "worksheet_change" event which checks to see if a
specific cell is being updated. If it is, I want to change the contents of the adjoining cell. This seems to work, except that in order to actually view the change (to the adjoining cell) I have to switch to a different sheet and back. How can I force this refresh/requery. I do not work often in Excel! I have seen "application.volatile"- and tried it- but if I understand correctly, this command doesn't work unless the function is performed in/under the current "target" cell- correct? Otherwise, I haven't found a whole lot of clues. I am working with Excel 2002; but this will be installed on to a computer with 2003. ********code for "worksheet_change"************** Private Sub Worksheet_Change(ByVal Target As Range) Dim iRow As Integer Dim iColumn As Integer iRow = Target.Row iColumn = Target.Column If ((iColumn = "7") And (iRow = "3")) Then Application.EnableEvents = False Cells(1, 1).Value = Date Cells(8, 3).Value = 0 Application.EnableEvents = True End If End Sub Also- actually, this would be a second question- I would like this same cell (the adjoining cell) to update upon opening the document. Again, I have code in place and working properly on "worksheet_activate"- but, if I change it to "workbook_open"- it does not (appear to) execute. *********** code snippet on "worksheet_activate"******** Dim intDays As Integer Dim dtDate As Date dtDate = Excel.Range("A1") intDays = Date - dtDate Application.EnableEvents = False Excel.Range("H3").Value = intDays THANKS! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
force entry in cell "B" if entry made in cell "A" | Excel Discussion (Misc queries) | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
"CELL("FILENAME") NOT UPDATE AFTER "SAVE AS" ACTION | Excel Discussion (Misc queries) | |||
Automatically click "Update Links" & "Continue" | Excel Programming | |||
Complex if test program possible? If "value" "value", paste "value" in another cell? | Excel Discussion (Misc queries) |