Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks to some generous help from users of this site, I, with no Visual Basic
knowledge, am using some VB code that requires the user to type his/her name into a given cell before the file can be saved, since the name must appear on the printed version. The user-name field is intentionally left blank. Upon attempting to save, the code presents a message to type in the name, if the name-field is still blank. Well, CATCH-22. This very code is preventing me from leaving the name field blank when I try to save the file in final form, ready for enduser use. The code I am using is: Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _ Cancel As Boolean) If IsEmpty(Sheets("Main").Range("E59").Value) Then MsgBox "You must type in your name before " & _ "this file can be saved.", 16, "ERROR" Cancel = True End If End Sub Any suggestions? ---Pat Riley |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Trying to catch data from a EXCEL file | Excel Discussion (Misc queries) | |||
Excel Interop Catch Event for Saving a file as xls and as xml? | Excel Programming | |||
Excel marcos firing on file save as but not file save | Excel Programming | |||
Save File to Another Directory, but not change Users File Save location | Excel Programming | |||
Catch FileSave/Save As/etc... | Excel Programming |