Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Paul,
Thank you for the suggestion. I keep getting a fatal error. It saves the csv, but then the actual save fails. Unfortunately I think I need to run my code after save and I did not see that as an event. Any ideas? Here is my code: Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Dim filename$ filename = "c:\daily manual trade totals1.csv" ActiveWorkbook.SaveAs filename:=filename, FileFormat:=xlCSV, CreateBackup:=False End Sub -----Original Message----- Tim, do it like this, put in thisworkbook code Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) 'your code here End Sub -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 97 & 2000 ** remove news from my email address to reply by email ** "Tim" wrote in message ... Is it possible to have the workbook save event trigger VB code to run in Excel? I know you can do it in ACCESS. If so, how would I do that? Thanks. . |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
automatically save a read-only workbook with client last name | Excel Discussion (Misc queries) | |||
can not save if this code is in the workbook | Excel Discussion (Misc queries) | |||
Workbook event code won't work on laptop | Excel Worksheet Functions | |||
Save Event - Determine if called by code or user | Excel Programming | |||
After save event | Excel Programming |