Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8351875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T08:46:50+00:00 2026-06-09T08:46:50+00:00

I have an Excel sheet on which I have created a list consisting of

  • 0

I have an Excel sheet on which I have created a list consisting of many values. Also I have created a macro which shows a userform in which those values are hard-coded.

Now I want that those values in the form to be automatically/programatically/dynamically added to my userform list, so that in the future, if I want to decrease the values from the list, then I would not have to change the macro again.

I have been searching for the answer but I have been unsuccessful in finding what I am looking for.

I have recorded this macro, but I don’t know how to retrieve values from it:

Sub Macro7()
'
' Macro7 Macro
'

'
Range("E1").Select
ActiveSheet.Range("$A$1:$AE$175").AutoFilter Field:=5
End Sub
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T08:46:53+00:00Added an answer on June 9, 2026 at 8:46 am

    The macro you’ve specified will turn on autofiltering for your active worksheet. This will provide column headers that will allow the user to filter to something of interest.
    Assuming that this kind of filtering of the worksheet is what you want, you can use something like:

    Dim r As Range
    'Note: set r to something useful, such as worksheet.Cells
    
    Dim vis As Range
    Set vis = r.SpecialCells(xlCellTypeVisible)
    
    'now vis holds a special "Range" object referring to the visible cells.
    'since (auto) filtering hides some cells, this vis range will help show only the cells that remain visible.
    'the output of SpecialCells, you should assume holds a complex Range,
    'which is composed of multiple Areas that are wrapped in one single Range object
    'the separate areas help you distinguish the visible cells from the hidden cells
    'fyi, various safety checks you can do: vis Is Range, vis Is Nothing
    
    Dim a as Areas
    Set a = r.Areas
    
    Dim cr as Range
    For Each cr in a
        'cr refers to a single (i.e. normal and contiguous) area range
        'where you can use cr.Row, cr.Column, cr.Rows.Count, cr.Columns.Count
    Next
    

    So when you do filtering, you can use SpecialCells(xlCellTypeVisible) to reveal the non-hidden cells, which are represented as have a range that wraps areas that represent contiguous ranges.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: correlation matrix in r I have an excel sheet which has 700
I am preparing an Excel sheet in which I have to maintain the version
I have done a small project, which consists of 5 excel sheet in, code
I have created Excel Sheet using Java program. It works fine. My problem is,
I have created a xlt excel template which works fine in Excel 2007 under
I have created a tool that imports an excel sheet. The excel COM object
I have a web app which reads an excel sheet and adds in 3
I have an excel spread sheet (well, hundreds of them) which I need importing
I have excel sheet with data which I want to get Levenshtein Distance between
I have a button on an Excel sheet which starts a new thread to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.