+ Reply to Thread
Results 1 to 4 of 4

Using One UserForm for Dynamic Range

  1. #1
    Registered User
    Join Date
    01-07-2023
    Location
    Indonesia
    MS-Off Ver
    Microsoft 365
    Posts
    5

    Using One UserForm for Dynamic Range

    I have a Multipage Userform with four pages that has the same layout and function. My initial goal is that every time I fill the the textbox on each page, it will be posted to a specific range. But then it makes the file size too big, I assume because each page has many CommandButton but I don't want to delete any of the CommandButton.

    Screenshot 2023-01-17 082046.jpg

    Is it possible that I only use a single page Userform to perform this task? So that the same textbox can be used to fill B or G or L, depending on which starting Cell I choose before opening the Userform? or maybe simplify the code so the file size won't be too big?

    Lets say I clik on any Cell on Column A before opening the userform, than Textbox 1 will fill column B and Textbox 2 will fill column C (on the same row) when I save it. But if I click on Cell F before opening up the userform, then Textbox 1 will fill column G and Textbox 2 will fill column H. SO the range changes depending on the starting cell.

    Here I attach the Code for the Userform in Ms.Word because my excel file is too big. Thank you so much for your help.

    Notes: "Simpan" means "Save"
    Attached Files Attached Files

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2407
    Posts
    26,156

    Re: Using One UserForm for Dynamic Range

    I don't think it's the userform that is making your file big. What does your data look like? How many worksheets? What are the ranges your code is writing data to?

    How big is the file?
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    01-07-2023
    Location
    Indonesia
    MS-Off Ver
    Microsoft 365
    Posts
    5

    Re: Using One UserForm for Dynamic Range

    Its almost 93,000 KB. Its making the excel slow.
    I have two other userforms in the same Worksheet, and all with many CommandButtons too.
    All the textbox in all userforms will fill the same worksheet.
    The file is supposed to be a database. But its already 93,000 KB even without the data that I have to input.

    On the worksheet there are lots of very long IF commands in multiple Columns and some hyperlink formulas.

    does the things I mentioned above affect greatly to the file size?

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2407
    Posts
    26,156

    Re: Using One UserForm for Dynamic Range

    Anything that goes on a worksheet affects file size. VBA and UserForms are not significant.

    "lots of very long IF commands in multiple Columns and some hyperlink formulas."

    How many rows and columns are used? How many worksheets?

+ 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] Use dynamic named range in userform combobox
    By frnzy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-18-2019, 03:13 AM
  2. [SOLVED] Populate Userform ComboBox from Dynamic Range
    By TFiske in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-23-2018, 09:57 AM
  3. [SOLVED] Value Dependent Dynamic Range ComboBox in Userform
    By Dferrier in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-15-2016, 04:27 AM
  4. Populate userform from dynamic range
    By HeyInKy in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-02-2014, 08:31 AM
  5. Populating Userform Listbox with Dynamic Range
    By VBAerthang in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-11-2013, 05:13 AM
  6. How to insert a dynamic range in a UserForm into a ListBox
    By stojko89 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-18-2011, 03:28 AM
  7. Populate a combobox in a userform with a dynamic range.
    By BigBas in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-23-2007, 01:12 PM

Tags for this Thread

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