+ Reply to Thread
Results 1 to 1 of 1

VBA Code Not working?

Hybrid View

  1. #1
    Registered User
    Join Date
    11-27-2007
    Posts
    7

    Question Need help with Select Case Code

    I am having trouble with a line of code I wrote...Under the Selection Change Sub I have written:

    Dim Ans as integer
    If Not IsEmpty(Target) Then
    Ans = MsgBox("Do you wish to change your order?", vbYesNo, "Change Order?")
        Select Case Ans
            Case Yes
                Target.Activate
            Case No
                Cells(NextItem, 2).Activate
        End Select
    End If
    NextItem is a user variable I set to just be a countA+1 as in a new order

    However "Case No" is not responding and the target is just activated anyways? Is this code wrong?
    Last edited by Jon Knights; 01-03-2008 at 10:51 AM. Reason: title not accurate

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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