+ Reply to Thread
Results 1 to 2 of 2

change range a table appears every time a button within a userform is clicked

  1. #1
    Forum Contributor
    Join Date
    04-23-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2013
    Posts
    116

    change range a table appears every time a button within a userform is clicked

    Hello,

    I have a userform with a button that, when clicked, filters sheet1 based on listbox responses, opens up a new sheet and pastes in a table based on filtered values from sheet1. The following works fine if I only want to create one table, but I would like to be able to click the button hundreds of times and have hundreds of tables added one after the other with an empty row between them.
    So, for instance, the first time the button is clicked a table spanning A1:E2 would be created based on certain filtered results on sheet1. The second time the button is clicked, a new filter would be created (this is not a problem, my code works for the filter), and I would like a new table spanning A4:E5 based on the new filter, and so forth ad infinitum.


    Please Login or Register  to view this content.
    So, if I could create a variable that increases by 3 each time I click the button, and then use that variable to define the ranges where I want the data posted, I think I would be in business. Problem is, I don't know how to go about this.

    Thanks!

  2. #2
    Forum Contributor
    Join Date
    04-23-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2013
    Posts
    116

    Re: change range a table appears every time a button within a userform is clicked

    Sorry! I made some mistakes with my original post. I came up with a solution on my own, which includes fixes to the above:

    Please Login or Register  to view this content.
    I imagine there are more elegant solutions out there, but this seems to work
    Last edited by mcdermott2; 04-11-2013 at 05:16 PM.

+ 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