Results 1 to 5 of 5

Select Case not working

Threaded View

  1. #1
    Registered User
    Join Date
    01-23-2009
    Location
    Hillsboro, Oregon
    MS-Off Ver
    Excel 2007
    Posts
    11

    Select Case not working

     Set GL = ActiveSheet.Range("d6:as6")
     Set SW = ActiveSheet.Range("aw6:cz6")
             
             If Process = "GL" Then
                GL.Activate
                            
                For Each Cell In Range("d6:as6")  '<--------- How do I call this properly?
                    If Cell.Value = Designation Then
                        
                        Select Case Quantity.Value  '<----- Object Required
                        
                            Case 1 To 14
                                PostCol = Cells.Column
                                
                            Case 15 To 24
                                PostCol = Cells.Offset(0, 1).Column
                                
                            Case 24 To 999
                                PostCol = Cells.Offset(0, 2).Column
                          
                        End Select
                      End If
                  Next Cell
              End If
    This is part of a function I am trying to make. I am getting an "Object Required" error. Quantity is passed from the Sub to the function o.k. (Inteli-Sense shows the value for me). Can I not use a Select Case operation this way?

    Also, when I start the loop, that is the only way I get it to recognize the range. How do I start that loop properly?

    All help is appreciated!
    Thanks!
    Last edited by RadBrad; 08-30-2009 at 04:26 PM. Reason: Added question

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