Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving Workbook
Right now, a button runs the following code: --------------------------------------------------- Private Sub CmdSubmit_Click() Application.DisplayAlerts = False ThisWorkbook.SaveAs "C:\Census\Archive\" & Sheet1.Cells(1, 1).Value & ".xls" Application.DisplayAlerts = True Application.DisplayAlerts = False ThisWorkbook.SaveAs "C:\Census\Batch_Files\" & Sheet1.Cells(1, 2).Value & ".xls" Application.DisplayAlerts = True MsgBox ("File Submitted Successfully") Application.ActiveWorkbook.Close End Sub ------------------------------------------------ Please tell me how to incorporate a condition which checks if a (C6) is filled in before saving the file. If cell C6 is empty, I want users to get a message box stating that they MUST fill in an entry in C6 before saving the file. Thanks, Yasser |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving Workbook
See your first post.
yasser wrote: Right now, a button runs the following code: --------------------------------------------------- Private Sub CmdSubmit_Click() Application.DisplayAlerts = False ThisWorkbook.SaveAs "C:\Census\Archive\" & Sheet1.Cells(1, 1).Value & ".xls" Application.DisplayAlerts = True Application.DisplayAlerts = False ThisWorkbook.SaveAs "C:\Census\Batch_Files\" & Sheet1.Cells(1, 2).Value & ".xls" Application.DisplayAlerts = True MsgBox ("File Submitted Successfully") Application.ActiveWorkbook.Close End Sub ------------------------------------------------ Please tell me how to incorporate a condition which checks if a (C6) is filled in before saving the file. If cell C6 is empty, I want users to get a message box stating that they MUST fill in an entry in C6 before saving the file. Thanks, Yasser -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Saving Workbook | Excel Discussion (Misc queries) | |||
Color Changes When Saving 2007 Workbook as 97 - 2003 Workbook | Excel Discussion (Misc queries) | |||
saving workbook | Excel Worksheet Functions | |||
Saving a sheet in a workbook as .csv but not changing workbook name | Excel Programming | |||
Saving a Workbook: Forcing User to Rename before Saving | Excel Programming |