LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Where do I paste this Code?

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
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
copy and paste using vb code ASU Excel Discussion (Misc queries) 1 September 10th 06 01:41 AM
How to paste html code to xls pm Excel Discussion (Misc queries) 0 January 21st 06 08:22 PM
VBA-code for search,copy and paste TUNGANA KURMA RAJU Excel Discussion (Misc queries) 0 December 12th 05 12:40 PM
(Cut - Paste in Excel )code in vc++ Allen New Users to Excel 0 June 23rd 05 09:47 AM
Need Help with Code - Copy & Paste JStone0218 Excel Programming 10 October 11th 03 04:09 PM


All times are GMT +1. The time now is 08:32 AM.

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"