+ Reply to Thread
Results 1 to 4 of 4

Confused bit of code lol

Hybrid View

flyinghigher2011 Confused bit of code lol 07-14-2013, 02:52 AM
JosephP Re: Confused bit of code lol 07-14-2013, 03:01 AM
flyinghigher2011 Re: Confused bit of code lol 07-14-2013, 03:40 AM
arlu1201 Re: Confused bit of code lol 07-15-2013, 05:16 AM
  1. #1
    Registered User
    Join Date
    07-07-2013
    Location
    Northampton uk
    MS-Off Ver
    Excel 2010
    Posts
    146

    Confused bit of code lol

    Good Morning Everyone.

    i have this bit of code, and seems to only work when it feels like it and not all the time. its in a dropdown list box, its on sheet 1 and its not on a userform its on the worksheet itself. Any ideas please.

    Private Sub worksheet_Activate()
    Dim i As Integer
    Dim location As String
    For i = 20 To 200
    Sheet1.Bpm.AddItem i
    Next i
    End Sub

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Confused bit of code lol

    that code will run when you switch to the worksheet from a different sheet-you really ought to clear the list first or you will keep adding the same items to the list
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    07-07-2013
    Location
    Northampton uk
    MS-Off Ver
    Excel 2010
    Posts
    146

    Re: Confused bit of code lol

    OMG as simple as that lol, thank you it worked.

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Confused bit of code lol

    flyinghigher2011,

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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. Replies: 1
    Last Post: 10-03-2012, 10:32 PM
  2. [SOLVED] Macro executes but not giving results :confused::confused::confused:
    By Ganesh7299 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-15-2012, 10:49 AM
  3. Confused
    By jdwoods2 in forum Excel General
    Replies: 3
    Last Post: 03-30-2011, 03:01 PM
  4. Confused about referencing multiple object code rows in other worksheets?
    By slunk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-28-2006, 05:40 PM
  5. [SOLVED] :S confused :S
    By Laura \( '_' \) in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 11-15-2005, 09:50 AM

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