Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This is probably a severe case of The Blindingly Obvious, but I just can't get
this simple task to work. I've put a button on worksheet "Records" who's code is supposed to check if cell C5 on sheet "Input" has a value in it. If cell C5 on "Input" doesn't have a value then the current time is written to it and the workbook is closed. If there is a value then the workbook just closes. What's happening though is that the Now value is being written to cell C5 on the "Records" worksheet. I've tried more variations than the Marquise de Sade, and possibly with the same pain, but just aren't getting anywhere, so any help would be seriously appreciated. Note: I've tried too many variations of selecting the active sheet to list. ---------------------------------------- Private Sub cmbCloseWorkbook2_Click() 'Close (and save) this workbook only Application.ScreenUpdating = False Worksheets("Input").Activate 'Test for End Time value. If empty then set C5 to Now() If Range("C5") = "" Then Range("C5") = Now ThisWorkbook.Close savechanges:=True Application.ScreenUpdating = True End Sub ----------------------------------------- Alan Burns |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
write formula that icludes data from sheet 1 to sheet 2 of my spr | Excel Worksheet Functions | |||
Write subtotals to another sheet | Excel Discussion (Misc queries) | |||
how to write to other sheet if and only if? | Excel Worksheet Functions | |||
how to allow macro to write on a protected sheet | Excel Programming | |||
write two excel sheet | Excel Programming |