LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ambiguous name detected? Derrick Excel Discussion (Misc queries) 7 July 8th 09 07:05 PM
Ambiguous error famdamly Excel Discussion (Misc queries) 1 February 27th 06 09:06 AM
ambiguous name detected mark Excel Programming 4 February 4th 04 03:01 PM
Ambiguous Name Detected Nigel[_5_] Excel Programming 11 October 26th 03 09:59 AM
Ambiguous Name Detected:~ jaf Excel Programming 0 September 12th 03 12:56 AM


All times are GMT +1. The time now is 10:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"