Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
ambiguous error
I have an Excel workbook which is a form that must be filled out b
employees. I wrote code so that if a certain box is left empty it wil not allow the workbook to be saved. The problem is that when I tried t copy and paste this code to another cell I get an error that say "ambiguous name detected, workbook_before close" My code is as follows Private Sub Workbook_BeforeClose(Cancel As Boolean) Dim j As Integer If Trim(Me.Worksheets("competency").Range("C3").Value ) = "" Then MsgBox "Cell C3 is empty. Please fill it" Cancel = True Exit Sub End If End Sub The problem is that I can't think of another name to name the event s this code will work. Any help is appreciated -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
ambiguous name detected? | Excel Discussion (Misc queries) | |||
Ambiguous error | Excel Discussion (Misc queries) | |||
ambiguous name detected | Excel Programming | |||
Ambiguous Name Detected | Excel Programming | |||
Ambiguous Name Detected:~ | Excel Programming |