Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I was got this code from the web, but I'm not able to execute it. I did
pasted to a module and I cant get it to work, I even try pasting it on the code of a control box button and will not work for me. Can some one please tell me what moronic mistake I'm doing, All I'm trying to do is save the time stamp from cell F3 thank you! __________________________________________________ _______ Dim FilePth As String, FileNm As String Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Application.EnableEvents = False If Range("F3").Value = "" Then Application.EnableEvents = True Exit Sub End If FilePth = "C:\TimeSheets\Test\" FileNm = Range("F3").Value ActiveWorkbook.SaveAs FilePth & FileNm, xlWorkbookNormal Cancel = True Application.EnableEvents = True End Sub __________________________________________________ ______ Kevin Brenner |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
copy and paste using vb code | Excel Discussion (Misc queries) | |||
How to paste html code to xls | Excel Discussion (Misc queries) | |||
VBA-code for search,copy and paste | Excel Discussion (Misc queries) | |||
(Cut - Paste in Excel )code in vc++ | New Users to Excel | |||
Need Help with Code - Copy & Paste | Excel Programming |