+ Reply to Thread
Results 1 to 7 of 7

How does this VBA code work?

  1. #1
    Forum Contributor
    Join Date
    02-08-2006
    Location
    UK
    MS-Off Ver
    2013
    Posts
    204

    Exclamation How does this VBA code work?

    Some kind soul provided me with this sample code which will populate a userform omitting rows where a cell is blank in column C (have attached the sheet).

    I'm trying to adapt it to a sheet where there are 22 columns (A - Q), and it is if a cell in column M is blank that the user form should show.

    Unfortunately I don't seem to understand the syntax of the code. I think the "Count, 3" bit is throwing me off.

    If someone could quickly explain it to me I'd be most appreciative.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by wonderdunder; 04-02-2012 at 11:46 AM.

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

    Re: How does this VBA code work? Desperately need help

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    02-08-2006
    Location
    UK
    MS-Off Ver
    2013
    Posts
    204

    Re: How does this VBA code work?

    offending 2 words removed. Can I see the "hidden" responses please or shall I go to the the naughty corner?

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

    Re: How does this VBA code work?

    Please Login or Register  to view this content.
    is what I said before...

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: How does this VBA code work?

    The title doesn't really describe the problem - something like explain code that loads userform.

    However, there's absolutely no point in looping through the range, just refer to all the non blank cells using Specialcells

    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  6. #6
    Forum Contributor
    Join Date
    02-08-2006
    Location
    UK
    MS-Off Ver
    2013
    Posts
    204

    Re: How does this VBA code work?

    Roy - many thanks. I'm trying to adopt this code so that the drop down box will only show data in column C if the cell in column M of the same row is not blank, but I do not understand the syntax of the code (as per my first post). Can you or someone else explain the code or if not provide the code amendments that will do as I need it to?

  7. #7
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: How does this VBA code work?

    Here'an explanation of my coe
    Please Login or Register  to view this content.

+ 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