LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Can't write to the right sheet

Tom Ogilvy wrote:
Private Sub cmbCloseWorkbook2_Click()

'Close (and save) this workbook only
Application.ScreenUpdating = False



With Worksheets("Input")

'Test for End Time value. If empty then set C5 to Now()
If .Range("C5") = "" Then .Range("C5") = Now

End With

ThisWorkbook.Close savechanges:=True
End Sub

Should work if you want to keep the code in the Click event.


Many thanks all for your time and help. Problem solved.


AB


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
write formula that icludes data from sheet 1 to sheet 2 of my spr john Excel Worksheet Functions 1 September 14th 07 03:22 AM
Write subtotals to another sheet Gerrym Excel Discussion (Misc queries) 1 March 16th 05 05:08 PM
how to write to other sheet if and only if? Len Canders Excel Worksheet Functions 10 February 16th 05 03:08 AM
how to allow macro to write on a protected sheet MVM Excel Programming 0 January 18th 05 05:05 PM
write two excel sheet imabegginner Excel Programming 0 June 26th 04 04:01 PM


All times are GMT +1. The time now is 04:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"