+ Reply to Thread
Results 1 to 3 of 3

Please explain this basic code - New to VBA

  1. #1
    Registered User
    Join Date
    12-16-2014
    Location
    Portland, OR
    MS-Off Ver
    2010
    Posts
    10

    Please explain this basic code - New to VBA

    Hi-

    I'm just stating out with VBA assigning basic macros to buttons and such for now.
    I was wondering if somebody could explain this code to me. It automatically updates an advanced filter based on the given criteria. (Code from extended office)

    Please Login or Register  to view this content.
    Also, how do I post code so it shows in a better format?
    Thanks!
    Last edited by alansidman; 01-10-2018 at 09:06 PM.

  2. #2
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,157

    Re: Please explain this basic code - New to VBA

    Please Login or Register  to view this content.
    This above macro is started each time any cell is selected, then the range "A5:D21" is filtered, based on the conditions from range "A1:C3" (without any unique values as a result).
    It would be better, e.g.:
    Please Login or Register  to view this content.
    This above macro will work only after you changing the criteria (in range "A1:C3"), one by one or only one.
    Last edited by mjr veverka; 01-10-2018 at 02:50 PM.

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    23,982

    Re: Please explain this basic code - New to VBA

    Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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] explain use of step 2 in VBA code
    By keshavtale in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-26-2016, 11:15 AM
  2. Explain VBA Code
    By love2waltz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-28-2015, 12:40 PM
  3. Ribbon code... Can someone please explain!
    By RustyNail in forum Excel General
    Replies: 1
    Last Post: 05-23-2015, 05:05 AM
  4. Explain code
    By josros60 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-04-2014, 12:33 AM
  5. Can some one explain this code for me ?
    By chriskingkiller in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-10-2013, 02:14 PM
  6. Can some one explain this code for me ?
    By chriskingkiller in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-10-2013, 12:41 AM
  7. Help Explain this Code
    By khalid79m in forum Excel General
    Replies: 1
    Last Post: 11-27-2008, 06:09 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