Results 1 to 6 of 6

Compile error: Ambiguous name detected

Threaded View

  1. #1
    Registered User
    Join Date
    06-05-2008
    Posts
    3

    Compile error: Ambiguous name detected

    Hi All,
    I searched the forums and i didnt see a topic like this so here it goes
    I am trying to program excel so that when someone enters a number the next cell will automatically enter the date and time. I figured it out for the first 2 columns but the subject error comes up for the next columns.
    I am attaching the file just in case i screwed up my explanation
    Update: i actually did see a thread with this topic.. but im still confused
    Thanks


    Private Sub Worksheet_Change(ByVal Target As Excel.Range)
    
            With Target
    
                If .Count > 1 Then Exit Sub
    
                If Not Intersect(Range("A2:A30"), .Cells) Is Nothing Then
    
                    Application.EnableEvents = False
    
                    With .Offset(0, 1)
    
                        .NumberFormat = "dd mmm yyyy hh:mm:ss"
    
                        .Value = Now
    
                    End With
    
                    Application.EnableEvents = True
    
                End If
    
            End With
    
        End Sub

    Private Sub Worksheet_Change(ByVal Target As Excel.Range)
    
            With Target
    
                If .Count > 1 Then Exit Sub
    
                If Not Intersect(Range("D2:D30"), .Cells) Is Nothing Then
    
                    Application.EnableEvents = False
    
                    With .Offset(0, 1)
    
                        .NumberFormat = "dd mmm yyyy hh:mm:ss"
    
                        .Value = Now
    
                    End With
    
                    Application.EnableEvents = True
    
                End If
    
            End With
    
        End Sub
    Attached Files Attached Files
    Last edited by VBA Noob; 06-05-2008 at 02:18 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Compile Error: Ambiguous Name Detected: Workbook_Open
    By Gos-C in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-19-2008, 10:46 AM
  2. Compile Error: Invalid Qualifier in column sum/cell naming program
    By xioncrush in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-09-2007, 12:35 AM
  3. Compile Error - Can't find project or Library
    By bmasella in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-10-2007, 07:55 PM
  4. Compile Error?!?
    By ChrisMattock in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-19-2007, 12:44 PM
  5. Ambiguous name detected - please help
    By umax in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-13-2006, 08:26 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1