Results 1 to 6 of 6

Looping through months VBA code

Threaded View

  1. #1
    Registered User
    Join Date
    03-21-2016
    Location
    india
    MS-Off Ver
    2010
    Posts
    9

    Looping through months VBA code

    Hello,

    I am new here (and also for coding), please excuse me if i am not following the pattern.

    Issue: i am trying to write a code which fills the 'textbox' by picking data from worksheet(ex - Function - January, Function - February,..) and cell address constant through sheets (Q12)

    however, below thing isnt working and the user form doesnt show anything.
    Private Sub monthlist_Change()
    
    Dim myarray As Variant
    Dim x As Long
    
    myarray = Array(January, February, March, April, May, June, July, August, September, October, November, December)
    
    For x = LBound(myarray) To UBound(myarray) Step 1
    
    
    If Me.monthlist.Text = "x" Then Me.sdmteamcount.Value = Worksheets("Functions - &x").Range("q12").Value
    
    Next x
    End Sub

    Your help is greatly appreciated.
    Last edited by harin; 03-22-2016 at 11:07 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Code keeps looping through
    By mikey3580 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-24-2014, 04:47 PM
  2. Help with looping of vba code
    By thaykhov in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-08-2014, 11:38 PM
  3. [SOLVED] Trying to change verbose looping code into more efficient (and shorter) code please
    By dawatcher in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-03-2013, 07:43 AM
  4. [SOLVED] Code for Looping a VBA
    By Jiptastic in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-13-2012, 08:38 PM
  5. Looping by weeks...by months
    By tmd2 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-08-2011, 10:45 PM
  6. looping code
    By Mayaleigh in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-09-2009, 03:12 PM
  7. Looping Code
    By maxwell13 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-30-2007, 08:12 PM

Tags for this Thread

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