+ Reply to Thread
Results 1 to 3 of 3

Loop If the value of the Combobox = Cell range

  1. #1
    Forum Contributor
    Join Date
    04-09-2013
    Location
    Philippines, Manila
    MS-Off Ver
    Excel 2010
    Posts
    140

    Loop If the value of the Combobox = Cell range

    Hi Everyone,

    I dont know what is wrong with my code, it is not functioning as I want to. What I am trying to do is to close those open items by choosing it on the combo box then change the value of the OPEN to CLOSED.

    Here is my code.

    Thank you in advance

    Please Login or Register  to view this content.
    Dim iMes As Integer
    Please Login or Register  to view this content.
    Dim strMessage As String

    Dim Count As Long

    If ComboBox1.Value = "" And ComboBox2.Value = "" Then
    strMessage = ("Please Ensure Everything is Filled Up!")
    iMes = MsgBox(strMessage, vbOKOnly)
    Exit Sub


    End If

    Count = 5

    Do While Range("A" & Count) <> ""

    If Range("A" & Count) = ComboBox2.Value Then
    Range("B" & Count) = "CLOSED"
    Range("E" & Count) = ComboBox1.Value
    End If

    Count = Count + 1
    Loop

    Unload UserForm3
    Please Login or Register  to view this content.
    Last edited by Jarvin24; 01-30-2015 at 10:42 AM.

  2. #2
    Forum Contributor
    Join Date
    04-09-2013
    Location
    Philippines, Manila
    MS-Off Ver
    Excel 2010
    Posts
    140

    Re: Loop If the value of the Combobox = Cell range

    Forgot the attachement..

    Sorry
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    04-09-2013
    Location
    Philippines, Manila
    MS-Off Ver
    Excel 2010
    Posts
    140

    Re: Loop If the value of the Combobox = Cell range

    Oh my.. I think I figure out the probelenm.

    The Cell Value is NUMBER while the Value in the combo box is TEXT..

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Userform - Combobox Cell selection Name Range
    By Excelnoub in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-31-2014, 11:29 AM
  2. For each cell in range loop does not recognize expanding range
    By jhren in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-07-2013, 07:49 AM
  3. Combobox selection to a different cell but connected to another name range
    By Fedi4 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-09-2013, 08:26 AM
  4. [SOLVED] Transferring a combobox value to a specific cell range
    By Julez80s in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-25-2012, 07:17 PM
  5. Replies: 3
    Last Post: 06-22-2012, 06:40 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