Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
I'm brand new to using VB.
I have been playing around with setting up required fields in Excel. I was lucky to find a post with the following code: Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) If Worksheets("Sheet1").Range("A2").Value = "" Then Cancel = True MsgBox "Please Fill-In A2" End If End Sub I have tested this and it works fine. This basically ensures that excel can't be saved unless the specified cells are filled in. Now for a really stupid question. How do I save this script to the excel workbook so that I can distribute to other users? Obviously if I try and save the workbook itself it prompts me to enter the required fields before saving, and if I just close without saving the script is lost. Any suggestions would be appreciated. Thanks, Jim |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? | Excel Discussion (Misc queries) | |||
Stop excel from dropping the 0 in the beginning of a number? | Setting up and Configuration of Excel | |||
Feature to flag unpopulated required fields in Excel? | Excel Discussion (Misc queries) | |||
Importing data from Access into Excel: prob w/ cutting off fields | Excel Worksheet Functions | |||
Use Excel fields in Word document | Excel Discussion (Misc queries) |